aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2009-09-26 09:03:19 +0000
committermescalinum <mescalinum@users.sourceforge.net>2009-09-26 09:03:19 +0000
commit1e1d2285d538c7fc71e687ce0eb77ea880e113e0 (patch)
treede2f3bac93fac862474b119939950bdb5196dcdc
parent7484bcdcaacf885e09f717adfe649d4054bf9964 (diff)
beware: (ab)using Makefiles may lead to severe injury to yourself
svn path=/trunk/externals/ffext/; revision=12454
-rw-r--r--composer/Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/composer/Makefile b/composer/Makefile
index 6162234..ce630d5 100644
--- a/composer/Makefile
+++ b/composer/Makefile
@@ -32,7 +32,7 @@ CFLAGS += -funroll-loops -fno-operator-names -fno-omit-frame-pointer -falign-fun
CFLAGS += -DPDSUF=\"$(PDSUF)\"
LDSHARED = $(CXX) $(PDBUNDLEFLAGS)
-all: $(LIBNAME)$(PDSUF)
+all: autogen_sources $(LIBNAME)$(PDSUF)
@echo '-----------------------------------------------------------------------------'
@echo ' $(LIBNAME)$(PDSUF) ('`test $(DEBUG) -eq 1 && echo debug || echo release`' build) '\
'[size: '`ls -gGh $(LIBNAME)$(PDSUF) | cut -d " " -f 3`']'
@@ -40,18 +40,19 @@ all: $(LIBNAME)$(PDSUF)
clean::
rm -f $(LIBNAME)$(PDSUF)
rm -f *.o *~
- rm -f editor_tk.cpp methods_pd.hpp methods_ed.hpp classsetup.cpp callwrappers_pd.cpp callwrappers_ed.cpp
+ rm -f $(AUTOGENERATED_SOURCES)
+ rm -f editor_tk.cpp
.SUFFIXES: .cpp .o
SRCS = Song.cpp Pattern.cpp Track.cpp Editor.o PdClasses.cpp
OBJS = ${SRCS:.cpp=.o}
-
+AUTOGENERATED_SOURCES = methods.hpp methods_pd.hpp methods_ed.hpp classsetup.cpp callwrappers_pd.cpp callwrappers_ed.cpp
Song.o: Song.cpp Song.hpp
Pattern.o: Pattern.cpp Pattern.hpp
Track.o: Track.cpp Track.hpp
Editor.o: Editor.cpp Editor.hpp editor_tk.cpp
-PdClasses.o: PdClasses.cpp PdClasses.hpp methods_pd.hpp methods_ed.hpp classsetup.cpp callwrappers_pd.cpp callwrappers_ed.cpp
+PdClasses.o: PdClasses.cpp PdClasses.hpp
.cpp.o: Makefile
$(CXX) $(CFLAGS) $(INCLUDES) -xc++ -c $<
@@ -62,6 +63,8 @@ $(LIBNAME)$(PDSUF): Makefile $(OBJS)
editor_tk.cpp: editor.tk
( echo 'static const char* editor_tk[] = {'; sed -e 's/\(["\\]\)/\\\1/g' -e 's/^/"/' -e 's/$$/",/' editor.tk; echo '"" };' ) > editor_tk.cpp
+autogen_sources: $(AUTOGENERATED_SOURCES)
+
methods.hpp: PdClasses.hpp
awk ' \
/^\/\*#end methods\*\/$$/{M=0} \
@@ -122,8 +125,6 @@ callwrappers_pd.cpp: methods.hpp
-e '/\/\/real call/s/(t_track_proxy\* arg0/(arg0/' \
-e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
-e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
- -e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
- -e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
> callwrappers_pd.cpp
callwrappers_ed.cpp: methods.hpp
@@ -135,6 +136,4 @@ callwrappers_ed.cpp: methods.hpp
-e '/\/\/real call/s/(t_track_proxy\* arg0/(arg0/' \
-e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
-e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
- -e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
- -e '/\/\/real call/s/\(arg[0-9]\+, \)[A-Za-z_*]\+ \(arg[0-9]\+\)/\1\2/g' \
> callwrappers_ed.cpp