diff options
author | pixel <pixel> | 2005-10-22 00:19:23 +0000 |
---|---|---|
committer | pixel <pixel> | 2005-10-22 00:19:23 +0000 |
commit | d173793d5d166628c459ae65259bf8ef092dc4b0 (patch) | |
tree | 2afeb7ba998aebbcfcdd1d8f0f0f151bf8a8c97f | |
parent | 55bc5a4e2bd7c1e54ee0b2f52356ba0b5cb7b790 (diff) |
Adding that funky auto-dependancy system :)
-rw-r--r-- | compile/macosX/Makefile | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/compile/macosX/Makefile b/compile/macosX/Makefile index 72e31d7..f862add 100644 --- a/compile/macosX/Makefile +++ b/compile/macosX/Makefile @@ -10,7 +10,7 @@ INCLUDES = \ -I../../mogltk/include \ -I../.. -CPPFLAGS = $(INCLUDES) -O4 -DSTDC_HEADERS -DREADLINE_STATIC -DHAVE_UNISTD_H -fexceptions `sdl-config --cflags` +CPPFLAGS = $(INCLUDES) -O4 -DSTDC_HEADERS -DREADLINE_STATIC -DHAVE_UNISTD_H -fexceptions `sdl-config --cflags` -DWORDS_BIGENDIAN LDFLAGS = -O4 `sdl-config --libs` @@ -19,7 +19,8 @@ vpath %.cc ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../.. vpath %.cpp ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib SOURCES = \ -Dalos.cc cd-tool.cpp +cd-tool.cpp +#Dalos.cpp MOGLTK_SOURCES = \ base.cc glwidgets.cc \ @@ -95,15 +96,18 @@ $(HASH_SOURCES) WHOLE_SOURCES = $(SOURCES) $(COMMON_SOURCES) $(MOGLTK_SOURCES) ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES)))) +ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES)))) DALOS_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES) $(MOGLTK_SOURCES)))) Dalos.o CD_TOOL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES)))) cd-tool.o -all: cd-tool +all: dep cd-tool -stats: - @wc $(WHOLE_SOURCES) +dep: $(ALL_DEPS) + +#stats: +# @wc $(WHOLE_SOURCES) dist: all ../../cd-tool.lua ../../FAQ-cd.txt ../../COPYING zip -j9 ../cd-tool-`date +%Y%m%d`-linux-dynamic.zip cd-tool ../../cd-tool.lua ../../FAQ-cd.txt ../../COPYING @@ -128,7 +132,7 @@ cd-tool-static: $(CD_TOOL_OBJECTS) $(STRIP) cd-tool-static clean: - rm -f Dalos Dalos-static cd-tool cd-tool-static *.o + rm -f Dalos Dalos-static cd-tool cd-tool-static *.o *.dep @@ -144,3 +148,15 @@ clean: #endef # #$(foreach src, $(WHOLE_SOURCES), $(if $(filter %.c, $(src)), $(eval $(call OBJECT_C_template, $(src))), $(eval $(call OBJECT_CXX_template, $(src))))) + + +%.dep : %.c + $(CC) $(CPPFLAGS) -M -MF $@ $< + +%.dep : %.cpp + $(CXX) $(CPPFLAGS) -M -MF $@ $< + +%.dep : %.cc + $(CXX) $(CPPFLAGS) -M -MF $@ $< + +-include $(ALL_DEPS) |