[Cc'd to pd-dev in case other people can teach us the proper way to strip(1).]
Hans-Christoph Steiner said this at Mon, 10 Feb 2003 10:36:22 -0500:
These tips were very helpful. I am on my way to porting my first external: ext13. autoconf is quite straight forward. After I clear it with Dieter, I'll commit my porting changes.
I have a related question, is this needed?: strip --strip-unneeded ext13.pd_darwin strip: unrecognized option: --strip-unneeded
And if so, what's the MacOS X equivalent? My first hacked together ext13.pd_darwin lib works though.
Hallo Hans-Christoph,
I'm glad those suggestions were a help.
I have no idea about "strip". I haven't used it, and I'm 95% sure it's not a necessary step. Looking at the Mac man page alone doesn't make it any clearer. However, from the Linux man page:
--strip-unneeded Strip all symbols that are not needed for relocation processing.
and now from the start of strip(1) in darwin-land:
strip no longer removes relocation entries under any con- dition. Instead, it updates the external relocation entries (and indirect symbol table entries) to reflect the resulting symbol table.
...so it sounds like strip, as used here in Pd-land, is not terribly useful, but further on in strip(1)-darwin:
When strip is used with no options on an executable file, it checks that file to see if it uses the dynamic link editor. If it does, the effect of the strip command is the same as using the -u and -r options.
... so that sounds to me like you might like to _experiment_ with strip using no options, and see if the default behaviour yields something that's still usable. :)
Otherwise, if others know better about using strip, especially on Mac OS X, please chime in.
Cheers, adam
On Tuesday, Jan 28, 2003, at 08:16 America/New_York, Adam Lindsay wrote:
Michael McGonagle said this at Mon, 27 Jan 2003 13:04:19 -0600:
I have been working with some externals for PD over the past few days, and having noticed that most makefiles do not have targets for Mac OS X (Darwin), it made me wonder if there is a "Universal" makefile that contains the needed code as a starting point for all externals.
Hi Michael.
When compiling for MacOSX, I started out using the makefile for expr~ as my model. There are a few refinements that have evolved. A linux makefile will typically get you 95% of the way there. The final 5% is best done by example, as I just learned this stuff empirically:
LINUXCFLAGS = -DPD -DUNIX -O6 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wshadow -Wstrict-prototypes -Werror \ -Wno-unused -Wno-parentheses -Wno-switch
would translate to:
MACOSXCFLAGS = -DPD -DUNIX -DMACOSX -O3 \ -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch
and...
LINUXLDFLAGS = -export_dynamic -shared
MACOSXLDFLAGS = -bundle -bundle_loader /path/to/pd/bin/pd -flat_namespace
(often you will find "-undefined suppress" in the place of "- bundle_loader", but explicitly telling the linker about Pd's symbols is better.)
Hope that's some help.
I'd love to make this a non-issue for most externals, and offer them pre- compiled, but it's hard to figure out how to package them so that a user's installation is trivial.
cheers, adam
--
Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list