[Scummvm-cvs-logs] SF.net SVN: scummvm:[41667] tools/branches/gsoc2009-decompiler/decompiler/ Makefile
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jun 19 11:50:00 CEST 2009
Revision: 41667
http://scummvm.svn.sourceforge.net/scummvm/?rev=41667&view=rev
Author: fingolfin
Date: 2009-06-19 09:50:00 +0000 (Fri, 19 Jun 2009)
Log Message:
-----------
Replaced Makefile by a more flexible one (basically our regular tools Makefile)
Modified Paths:
--------------
tools/branches/gsoc2009-decompiler/decompiler/Makefile
Modified: tools/branches/gsoc2009-decompiler/decompiler/Makefile
===================================================================
--- tools/branches/gsoc2009-decompiler/decompiler/Makefile 2009-06-19 09:48:56 UTC (rev 41666)
+++ tools/branches/gsoc2009-decompiler/decompiler/Makefile 2009-06-19 09:50:00 UTC (rev 41667)
@@ -1,15 +1,97 @@
-.PHONY: clean
+# $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-decompiler/Makefile $
+# $Id: Makefile 40546 2009-05-13 23:38:11Z strangerke $
-DEPS = $(patsubst %.cc,%.o,$(*.cc))
+#######################################################################
+# Default compilation parameters. Normally don't edit these #
+#######################################################################
-#%.o: %.cc
-# g++ -Wall -g -c $< -o $@
+srcdir ?= .
-decompiler: decompiler.o $(DEPS)
- g++ -Wall -g -lboost_program_options $^ -o $@
+DEFINES :=
+LDFLAGS := $(LDFLAGS)
+INCLUDES := -I. -I$(srcdir)
+LIBS :=
+OBJS :=
+DEPDIR := .deps
-decompiler.o: decompiler.cc misc.h instruction.h parser.h reader.h cfg.h graph.h
- g++ -Wall -g -c decompiler.cc -o decompiler.o
+# Load the make rules generated by configure
+# HACK: We don't yet support configure in the tools SVN module, but at least one can
+# manually create a config.mk files with overrides, if needed.
+-include config.mk
+CXXFLAGS += -g
+
+# Additional warnings
+CXXFLAGS:= -Wall $(CXXFLAGS)
+# Turn off some annoying and not-so-useful warnings
+CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
+# Enable even more warnings...
+CXXFLAGS+= -pedantic # -pedantic is too pedantic, at least on Mac OS X
+CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wconversion
+#CXXFLAGS+= -Wshadow
+CXXFLAGS+= -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
+
+# Disable exceptions, and enabled checking of pointers returned by "new"
+CXXFLAGS+= -fno-exceptions -fcheck-new
+
+#######################################################################
+# Default commands - put the necessary replacements in config.mk #
+#######################################################################
+
+CAT ?= cat
+CP ?= cp
+ECHO ?= printf
+INSTALL ?= install
+MKDIR ?= mkdir -p
+RM ?= rm -f
+RM_REC ?= $(RM) -r
+ZIP ?= zip -q
+
+CC := gcc
+CXX := g++
+
+#######################################################################
+
+# HACK: Until we get proper module support, add these "module dirs" to
+# get the dependency tracking code working.
+MODULE_DIRS := ./ utils/
+
+#######################################################################
+
+TARGETS := \
+ decompiler$(EXEEXT)
+
+all: $(TARGETS)
+
clean:
- rm -rf decompiler *.o
+ rm -f *.o $(TARGETS)
+
+
+.PHONY: all clean
+
+
+decompiler$(EXEEXT): decompiler.o
+ $(CXX) $(LDFLAGS) -o $@ $+ -lboost_program_options
+
+
+######################################################################
+# The build rules follow - normally you should have no need to
+# touch whatever comes after here.
+######################################################################
+
+# Concat DEFINES and INCLUDES to form the CPPFLAGS
+CPPFLAGS := $(DEFINES) $(INCLUDES)
+
+# Include the build instructions for all modules
+#-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
+
+# Depdir information
+DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS))
+DEPFILES =
+
+%.o: %.cpp
+ $(MKDIR) $(*D)/$(DEPDIR)
+ $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+
+# Include the dependency tracking files.
+-include $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
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