diff options
Diffstat (limited to 'compile')
-rw-r--r-- | compile/Makefile | 7 | ||||
-rw-r--r-- | compile/linux/Makefile | 2 | ||||
-rw-r--r-- | compile/win32/Makefile | 30 |
3 files changed, 34 insertions, 5 deletions
diff --git a/compile/Makefile b/compile/Makefile index 0b4f2b3..5cb971e 100644 --- a/compile/Makefile +++ b/compile/Makefile @@ -8,3 +8,10 @@ clean: make -C linux clean rebuild: clean all + +release: + ssh sumarit rm /var/www/cd-tool/* + scp cd-tool*.zip sumarit:/var/www/cd-tool + scp ../FAQ-cd.txt sumarit:/var/www/cd-tool/README.txt + scp ../COPYING sumarit:/var/www/cd-tool + scp *.lua sumarit:/var/www/cd-tool diff --git a/compile/linux/Makefile b/compile/linux/Makefile index 018c4bf..2e54e76 100644 --- a/compile/linux/Makefile +++ b/compile/linux/Makefile @@ -10,7 +10,7 @@ INCLUDES = -I../../includes -I../../psxdev -I../../generic/include \ -I../.. \ `sdl-config --cflags` -CPPFLAGS = $(INCLUDES) -O4 -march=i686 -DSTDC_HEADERS -DREADLINE_STATIC -DHAVE_UNISTD_H +CPPFLAGS = $(INCLUDES) -O4 -march=i686 -DSTDC_HEADERS -DREADLINE_STATIC -DHAVE_UNISTD_H -fexceptions LDFLAGS = -march=i586 -O4 `sdl-config --libs` diff --git a/compile/win32/Makefile b/compile/win32/Makefile index 2938ad2..4359413 100644 --- a/compile/win32/Makefile +++ b/compile/win32/Makefile @@ -11,7 +11,7 @@ INCLUDES = -I../../includes -I../../psxdev -I../../generic/include \ -I/usr/local/cross-tools/i386-mingw32msvc/include/SDL \ -I../.. -CPPFLAGS = $(INCLUDES) -O4 -march=i686 -DSTDC_HEADERS -DREADLINE_STATIC +CPPFLAGS = $(INCLUDES) -O4 -march=i686 -DSTDC_HEADERS -DREADLINE_STATIC -fexceptions LDFLAGS = -march=i586 -O4 @@ -70,7 +70,7 @@ LUA_SOURCES = \ PSX_SOURCES = \ ../../lib/cdabstract.cpp ../../lib/luacd.cpp \ ../../lib/cdreader.cpp ../../lib/luapsx.cpp \ -../../lib/cdutils.cpp ../../lib/lzss.cpp \ +../../lib/cdutils.cpp \ ../../lib/yazedc.cpp ../../lib/isobuilder.cpp PSXDEV_SOURCES = \ @@ -91,11 +91,15 @@ WHOLE_SOURCES = $(SOURCES) $(COMMON_SOURCES) $(MOGLTK_SOURCES) ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES)))) +ALL_DEP = $(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.exe Dalos.exe +CD_TOOL_DEP = $(addsuffix .dep, $(notdir $(basename $(COMMON_SOURCES)))) cd-tool.o + +all: dep cd-tool.exe Dalos.exe stats: @wc $(WHOLE_SOURCES) @@ -116,19 +120,37 @@ cd-tool.exe: $(CD_TOOL_OBJECTS) upx-nrv -9 cd-tool.exe clean: - rm -f *.exe *.o + rm -f *.exe *.o *.dep +dep: $(ALL_DEP) +source: dep $(COMMON_SOURCES) ../../cd-tool.cpp + for s in $(COMMON_SOURCES) ../../cd-tool.cpp ; do \ + depfile=$${s/*\//} ; \ + depfile=$${depfile/\.*/}.dep ; \ + for f in `cat $$depfile | sed 's/\\\\//g' | tr \\ '\\012' | grep -v ^$$ | grep -v :` $$s; do \ + install -D $$f tmp/`echo $$f | sed 's/\.\.\/\.\.\///'` ; \ + done ; \ + done + (cd tmp ; zip -r9 ../../cd-tool-`date +%Y%m%d`-win32-fullsrc.zip .) + rm -rf tmp +-include $(ALL_OBJECTS:.o=.dep) define OBJECT_C_template $(addsuffix .o, $(notdir $(basename $(1)))): $(src) $$(CC) $$(CPPFLAGS) $$(CFLAGS) -c $(src) + + $(addsuffix .dep, $(notdir $(basename $(1)))): $(src) + $$(CC) $$(CPPFLAGS) $$(CFLAGS) -MM $(src) -o $$@ endef define OBJECT_CXX_template $(addsuffix .o, $(notdir $(basename $(1)))): $(src) $$(CXX) $$(CPPFLAGS) $$(CXXFLAGS) -c $(src) + + $(addsuffix .dep, $(notdir $(basename $(1)))): $(src) + $$(CXX) $$(CPPFLAGS) $$(CXXFLAGS) -MM $(src) -o $$@ endef $(foreach src, $(WHOLE_SOURCES), $(if $(filter %.c, $(src)), $(eval $(call OBJECT_C_template, $(src))), $(eval $(call OBJECT_CXX_template, $(src))))) |