right way to add a library to src/
Mihir Luthra
1999mihir.luthra at gmail.com
Thu Jan 16 12:20:30 UTC 2020
Hi,
I was trying to add some code to a new directory in macports-base/src/ dir
such that I can use it in both porttrace.tcl(as a tcl cmd) and
darwintrace.c.
Basically it is a library that needs to be dynamically generated(because it
uses `__attribute__((constructor))`)
I see 2 choices:
1) To generate .o files in the new directory and use those in
darwintracelib1.0 and pextlib1.0. As both darwintrace and pextlib are
ultimately dynamic libraries, it should work I suppose.
2) To create a separate dylib file which I am not sure how to handle
linking to both darwintrace code and pextlib. Like what are the standard
lib storage locations for macports src? Should I simply add it to tcl
package path and link it in Makefiles of both darwintracelib and pextlib?
What would be the right way to do this? Also, is there any reference on how
to conform to macports Makefile structure?
Mihir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20200116/a1363bb6/attachment.html>
More information about the macports-dev
mailing list