[Scummvm-cvs-logs] SF.net SVN: scummvm:[46571] tools/branches/gsoc2009-gui/Makefile.common

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Dec 26 02:34:46 CET 2009


Revision: 46571
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46571&view=rev
Author:   fingolfin
Date:     2009-12-26 01:34:46 +0000 (Sat, 26 Dec 2009)

Log Message:
-----------
TOOLS build system: Add a 'clean' rule to the PROGRAM_template; some tweaks

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/Makefile.common

Modified: tools/branches/gsoc2009-gui/Makefile.common
===================================================================
--- tools/branches/gsoc2009-gui/Makefile.common	2009-12-26 01:20:12 UTC (rev 46570)
+++ tools/branches/gsoc2009-gui/Makefile.common	2009-12-26 01:34:46 UTC (rev 46571)
@@ -5,6 +5,13 @@
 # $Id$
 
 
+######################################################################
+# The default build target
+######################################################################
+
+all:
+
+
 # TODO: This file should be restructured and much of it moved
 # to module.mk style files.
 
@@ -35,7 +42,7 @@
 	for i in $^ ; do install -p -m 0755 $$i $(DESTDIR) ; done
 
 bundle_name = ScummVM\ Tools.app
-bundle: $(TARGETS)
+bundle: tools_gui$(EXEEXT)
 	mkdir -p $(bundle_name)
 	mkdir -p $(bundle_name)/Contents
 	mkdir -p $(bundle_name)/Contents/MacOS
@@ -80,9 +87,19 @@
 	tool.o \
 	$(UTILS)
 
+
 create_sjisfnt_OBJS := create_sjisfnt.o $(UTILS)
 create_sjisfnt_LIBS := `freetype-config --libs` -liconv
+# Set custom build flags
+create_sjisfnt.o: CPPFLAGS+=`pkg-config --cflags gtk+-2.0`
 
+
+sword2_clue_OBJS := sword2_clue.o
+sword2_clue_LIBS := `pkg-config --libs gtk+-2.0`
+# Set custom build flags
+sword2_clue.o: CPPFLAGS+=`pkg-config --cflags gtk+-2.0`
+
+
 tools_gui_OBJS := \
 	gui/main.o \
 	gui/configuration.o \
@@ -122,6 +139,14 @@
 	$(UTILS)
 tools_gui_LIBS := $(WXLIBS) $(LIBS)
 
+# Set custom build flags for various files
+gui/configuration.o: CPPFLAGS+=$(WXINCLUDES)
+gui/gui_tools.o: CPPFLAGS+=$(WXINCLUDES)
+gui/main.o: CPPFLAGS+=$(WXINCLUDES)
+gui/pages.o: CPPFLAGS+=$(WXINCLUDES)
+
+
+
 tools_cli_OBJS := \
 	main_cli.o \
 	tools_cli.o \
@@ -159,33 +184,31 @@
 	$(UTILS)
 tools_cli_LIBS := $(LIBS)
 
-sword2_clue_OBJS := sword2_clue.o
-sword2_clue_LIBS := `pkg-config --libs gtk+-2.0`
 
+######################################################################
 
+
+# Template for all executable targets.
+# This also automatically hooks up a "clean" rule.
 define PROGRAM_template
 $(1)$(EXEEXT): $$($(1)_OBJS)
 	$(CXX) $(LDFLAGS) $$($(1)_LIBS) -o $(1)$(EXEEXT) $$($(1)_OBJS)
+#all: $(1)$(EXEEXT)
+clean-$(1):
+	$(RM) $(1)$(EXEEXT)
+clean: clean-$(1)
 endef
 
 # Generate build rules for all tools
 $(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
 
 
+######################################################################
+
 clean:
-	rm -f $(addsuffix *.o,$(MODULE_DIRS)) $(TARGETS)
+	$(RM) $(addsuffix *.o,$(MODULE_DIRS))
 
 
-# Set custom build flags for various files
-gui/configuration.o: CPPFLAGS+=$(WXINCLUDES)
-gui/gui_tools.o: CPPFLAGS+=$(WXINCLUDES)
-gui/main.o: CPPFLAGS+=$(WXINCLUDES)
-gui/pages.o: CPPFLAGS+=$(WXINCLUDES)
-
-create_sjisfnt.o: CPPFLAGS+=`pkg-config --cflags gtk+-2.0`
-sword2_clue.o: CPPFLAGS+=`pkg-config --cflags gtk+-2.0`
-
-
 ######################################################################
 # The build rules follow - normally you should have no need to
 # touch whatever comes after here.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list