<div dir="ltr">Hi,<br><div><br></div><div>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.</div><div><br></div><div>Basically it is a library that needs to be dynamically generated(because it uses `__attribute__((constructor))`)</div><div><br></div><div>I see 2 choices:</div><div><br></div><div>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.</div><div><br></div><div>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? </div><div><br></div><div>What would be the right way to do this? Also, is there any reference on how to conform to macports Makefile structure?</div><div><br></div><div>Mihir</div></div>