Hello all,
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.
Is there some documentation on compiling externals? I have looked at the tutorial for externals at 'iem', but it does not get into any of the "compilation" things. Is there one way to compile an external? What sorts of options are there?
Thanks,
Mike
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