[PD] Universal Makefile for PD

Adam Lindsay atl at comp.lancs.ac.uk
Tue Jan 28 14:16:43 CET 2003

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

LINUXCFLAGS = -DPD -DUNIX -O6 -funroll-loops -fomit-frame-pointer \
    -Wall -W -Wshadow -Wstrict-prototypes -Werror \
    -Wno-unused -Wno-parentheses -Wno-switch

would translate to:

    -Wall -W -Wstrict-prototypes \
    -Wno-unused -Wno-parentheses -Wno-switch


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

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.


 Adam T. Lindsay                      atl at comp.lancs.ac.uk
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608

More information about the Pd-list mailing list