summaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-06-07 17:36:10 +0100
committerTim Redfern <tim@eclectronics.org>2012-06-07 17:36:10 +0100
commit0efe1e5704e57359fb74dbdf5b8e82dbc5df54c7 (patch)
tree5530d33e99556fedfdc8644d6a5d0ecf62a31013 /src/makefile
initial commit
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/makefile b/src/makefile
new file mode 100644
index 0000000..7042469
--- /dev/null
+++ b/src/makefile
@@ -0,0 +1,34 @@
+#set PDSRC to location of pd source
+#set PD to pd install location
+CC=cc
+STRIP=strip
+
+NAME=overo_gpioin
+
+Phony: $(NAME).pd_linux
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \
+ -W -Wshadow -Werror -Wstrict-prototypes \
+ -Wno-parentheses -Wno-switch \
+ -fPIC
+
+#-Wall -Wno-unused
+
+LINUXINCLUDE = -I$(PDSRC)/src
+
+.c.pd_linux:
+ $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ $(CC) -lpthread -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm -L/usr/local/lib
+ $(STRIP) --strip-unneeded $*.pd_linux
+ rm -f $*.o ../$*.pd_linux
+ ln -s $*/$*.pd_linux ..
+
+install:
+ cp help-*.pd $(PD)/doc/5.reference
+
+clean:
+ rm -f *.o *.pd_* so_locations
+
+