[Scummvm-cvs-logs] CVS: scummvm Makefile,1.59,1.60 Makefile.common,1.78,1.79

Max Horn fingolfin at users.sourceforge.net
Fri Jan 30 13:57:50 CET 2004


Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26470

Modified Files:
	Makefile Makefile.common 
Log Message:
Various changes to the build system which allow building ScummVM in an external directory (and as such, allow you to have a debug, a profiling, and a release build from the same set of source files in parallel). Work in progress

Index: Makefile
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- Makefile	30 Jan 2004 21:03:17 -0000	1.59
+++ Makefile	30 Jan 2004 21:54:27 -0000	1.60
@@ -15,19 +15,22 @@
 # Default compilation parameters. Normally don't edit these           #
 #######################################################################
 
+srcdir      ?= .
+builddir    ?= .
+
 DEFINES     := -DHAVE_CONFIG_H
 LDFLAGS     :=
-INCLUDES    := -I. -Icommon
+INCLUDES    := -I$(srcdir) -I$(srcdir)/common
 LIBS	    :=
 OBJS	    :=
 
 MODULES     :=
 MODULE_DIRS :=
 
-EXECUTABLE := scummvm$(EXEEXT)
+EXECUTABLE  := scummvm$(EXEEXT)
 
 # Load the make rules generated by configure
-include config.mak
+include $(builddir)/config.mak
 
 # Uncomment this for stricter compile time code verification
 # CXXFLAGS+= -Werror
@@ -44,10 +47,10 @@
 # Misc stuff - you should normally never have to edit this            #
 #######################################################################
 
-include Makefile.common
+include $(srcdir)/Makefile.common
 
 # check if configure has been run or has been changed since last run
-config.mak: configure
+$(builddir)/config.mak: $(srcdir)/configure
 	@echo "You need to run ./configure before you can run make"
 	@echo "Either you haven't run it before or it has changed."
 	@echo "If you cannot run configure, use 'make -f Makefile.noconf'"

Index: Makefile.common
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile.common,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- Makefile.common	16 Dec 2003 02:24:30 -0000	1.78
+++ Makefile.common	30 Jan 2004 21:54:27 -0000	1.79
@@ -120,7 +120,7 @@
 CPPFLAGS:= $(DEFINES) $(INCLUDES)
 
 # Include the build instructions for all modules
--include $(addsuffix /module.mk,$(MODULES))
+-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
 
 # Depdir information
 DEPDIRS = $(addsuffix /$(DEPDIR),$(MODULE_DIRS))
@@ -171,4 +171,4 @@
 
 # Include the dependency tracking files. We add /dev/null at the end
 # of the list to avoid a warning/error if no .d file exist
--include $(wildcard $(addsuffix /*.d,$(DEPDIRS))) /dev/null
+-include $(wildcard $(addprefix $(srcdir)/, $(addsuffix /*.d,$(DEPDIRS)))) /dev/null





More information about the Scummvm-git-logs mailing list