prefix=$(DESTDIR)/usr #EXTERNALS = $(shell ls *.c ) EXTERNALS = sp.chop~.c sp.decimate~.c sp.diode~.c sp.foldback~.c sp.foldover~.c sp.freqdiv~.c sp.freqshift~.c sp.harmgen~.c sp.rectify~.c sp.round~.c sp.saturate~.c sp.sieve~.c sp.split~.c sp.ustep~.c sp.vowel~.c all: $(EXTERNALS:.c=.pd_linux) .SUFFIXES: .pd_linux LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch LINUXINCLUDE = -I. -I.. -I../include %.pd_linux: %.c $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o "$*.o" -c "$*.c" ld -export_dynamic -shared -o "$*.pd_linux" "$*.o" -lc -lm \ `test -f $*.libs && cat $*.libs` chmod a-x "$*.pd_linux" # strip --strip-unneeded $*.pd_linux rm -f "$*.o" clean: -rm *.pd_linux *~ *.c -rm link.stamp install-doc: @test -d $(prefix)/lib/pd/doc/5.reference || mkdir -p $(prefix)/lib/pd/doc/5.reference cp -r ../doc/* $(prefix)/lib/pd/doc/5.reference install: install-doc @test -d $(prefix)/lib/pd/extra || mkdir -p $(prefix)/lib/pd/extra install -m644 *.pd_linux $(prefix)/lib/pd/extra