From 1e9ee7bc8ebcba281bf912d7527d3e3e9fcbaba7 Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Mon, 11 Oct 2010 15:30:53 +0000 Subject: Fixed a few bugs, added a symbol handler to paramGui and updated help files svn path=/trunk/externals/tof/; revision=14219 --- src/Makefile | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index bd98bf8..9e3647e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,18 +1,21 @@ # # SETUP # + # Points to the folder that contains pd's /src dir PD_SRC = ../../../pd -# Points to the folder that contains pd's compiled /bin dir + +# Points to the folder that contains pd's compiled /bin dir (for OS X) PD_BIN = /Applications/Pd-extended.app/Contents/Resources -# Points to the folder to which you want to put the built file -OUTPUT = ~/Make/pd/tof +# Points to the folder to which you want to move the built file +OUTPUT = ~/Make/pd/tof # # FIND OS # + UNAME := $(shell uname -s) ifeq ($(UNAME),Linux) OS_NAME = linux @@ -111,18 +114,46 @@ endif CXXFLAGS = $(CFLAGS) +### C++ files +%.$(EXTENSION): %.cpp +%.$(EXTENSION): %.cc + $(CXX) $(OPT_CFLAGS) $(CXXFLAGS) -o "$*.o" -c "$<" + $(CXX) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) + chmod a-x "$*.$(EXTENSION)" +# $(STRIP) $*.$(EXTENSION) +# rm -f -- $*.o + mv $*.$(EXTENSION) $(OUTPUT) -### C files +%.o: %.cpp +%.o: %.cc + $(CXX) $(OPT_CFLAGS) $(CXXFLAGS) -o "$*.o" -c "$<" -.c: - $(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c" - $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) +### C files +%.o: %.c + $(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c" + +%.$(EXTENSION): %.o + $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) \ + `test -f $*.libs && cat $*.libs` \ + `my_dylib=$(patsubst $(externals_src)/%,%,$(@D)); test -f $(@D)/lib$${my_dylib}.$(DYLIB_EXTENSION) && echo -L$(@D) -l$$my_dylib` \ + `my_obj=$(patsubst $(externals_src)/%,%,$(@D)); test -f $(@D)/shared/$${my_obj}.o && echo $(@D)/shared/$${my_obj}.o` \ + `test -f $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs && \ + cat $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs` chmod a-x "$*.$(EXTENSION)" $(STRIP) $*.$(EXTENSION) rm -f -- $*.o mv $*.$(EXTENSION) $(OUTPUT) +### C files +#.c: +# $(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c" +# $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) +# chmod a-x "$*.$(EXTENSION)" +# $(STRIP) $*.$(EXTENSION) +# rm -f -- $*.o +# mv $*.$(EXTENSION) $(OUTPUT) + -- cgit v1.2.1