Skip to content

Instantly share code, notes, and snippets.

@nagachika
Created September 14, 2009 14:59
Show Gist options
  • Save nagachika/186703 to your computer and use it in GitHub Desktop.
Save nagachika/186703 to your computer and use it in GitHub Desktop.
Makefile for PureData external object
CC = gcc
CFLAGS = -I/Applications/Pd-extended.app/Contents/Resources/include \
-fPIC
LDSHARED = $(CC) -dynamic -bundle -undefined suppress -flat_namespace
PD_DYLIB_EXT=pd_darwin
SRC = helloworld.c
OBJ = ${SRC:.c=.o}
TARGET=helloworld.${PD_DYLIB_EXT}
${TARGET}: ${OBJ}
helloworld.${PD_DYLIB_EXT}: ${OBJ}
${LDSHARED} -o $@ $<
.c.o:
${CC} ${CFLAGS} -c -o $@ $<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment