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

Reply via email to