diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2014-01-28 08:53:40 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2014-01-28 08:53:40 +0000 |
commit | e652a0daf09bcbd40bfe0eb4147b896e44a799d3 (patch) | |
tree | 5cacc215b7a90a620ba308934b90ffed6a9a2ff6 /externals/iem/Make.include | |
parent | 34362ac03aaf73385b41db61c5436bddf92699b1 (diff) |
common build infrastructure for iem-libs
svn path=/trunk/; revision=17260
Diffstat (limited to 'externals/iem/Make.include')
-rw-r--r-- | externals/iem/Make.include | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/externals/iem/Make.include b/externals/iem/Make.include new file mode 100644 index 00000000..aaca607a --- /dev/null +++ b/externals/iem/Make.include @@ -0,0 +1,56 @@ +current: all + +PD_DEFINES = -DPD -DUNIX + +################################# +# path to private Pd-headers +PDSOURCE ?= /usr/local/src/pd/src + +# path to iemlib.h +IEMLIB_INCLUDE = ../../include + +#define to true if private Pd-header g_canvas.h is in out search-path +PD_DEFINES += -DHAVE_G_CANVAS_H +################################# + + +.SUFFIXES: .pd_linux + +EXT = pd_linux + +STRIP = strip + +PD_LDFLAGS = --export-dynamic -shared $(LD_FLAGS) +PD_LIB = -lm -lc $(LIB) + +#select either the DBG and OPT compiler flags below: + +DBG_CFLAGS=-W -Wno-parentheses -Wno-switch -Wno-unused +CFLAGS=-O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing +PD_CFLAGS = $(PD_DEFINES) -fPIC -fno-stack-protector $(DBG_CFLAGS) $(CFLAGS) + +PD_INCLUDES = -I. -I$(IEMLIB_INCLUDE) -I$(PDSOURCE) -I../../../../pd/src + +# the sources +#SRC = $(sort $(filter %.c, $(wildcard *.c))) + +OBJ = $(SRC:.c=.o) + +# +# ------------------ targets ------------------------------------ +# + +clean: + -rm -f ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT) + -rm -f *.o + +all: $(OBJ) + @echo :: $(OBJ) + $(LD) $(PD_LDFLAGS) -o $(TARGET).$(EXT) *.o $(PD_LIB) + $(STRIP) --strip-unneeded $(TARGET).$(EXT) + -cp $(TARGET).$(EXT) ../../lib/ + +$(OBJ) : %.o : %.c + touch $*.c + $(CC) $(PD_CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c + |