diff options
-rw-r--r-- | Make.include | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/Make.include b/Make.include index 74f32b7..fbecf97 100644 --- a/Make.include +++ b/Make.include @@ -1,11 +1,44 @@ +current: all + PDSOURCE = /usr/local/src/pd-0.37-4/src + +.SUFFIXES: .pd_linux + +EXT = pd_linux + LDFLAGS = -export-dynamic -shared LIB = -ldl -lm -lpthread #select either the DBG and OPT compiler flags below: CFLAGS = -DPD -DUNIX -W -Werror -Wno-unused \ -Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer \ - -DDL_OPEN -fPIC + -DDL_OPEN -fPIC + + +INCLUDE = -I. -I$(PDSOURCE) + +# the sources +SRC = $(sort $(filter %.c, $(wildcard *.c))) + +OBJ = $(SRC:.c=.o) + +# +# ------------------ targets ------------------------------------ +# + +clean: + -rm ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT) + -rm *.o + +all: $(OBJ) + @echo :: $(OBJ) + ld $(LDFLAGS) -o $(TARGET).$(EXT) *.o $(LIB) + strip --strip-unneeded $(TARGET).$(EXT) + -cp $(TARGET).$(EXT) ../../lib + +$(OBJ) : %.o : %.c + touch $*.c + cc $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c |