aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMax Horn2004-01-30 21:54:28 +0000
committerMax Horn2004-01-30 21:54:28 +0000
commitda76ac5890ee662cb8026ea07a0566c61889df4a (patch)
treeb9f9fc0a8a343ef7ce96b2b195e6e225e5d45cb3 /Makefile
parent671be90c74e991087a38f236431e0532f83c77e6 (diff)
downloadscummvm-rg350-da76ac5890ee662cb8026ea07a0566c61889df4a.tar.gz
scummvm-rg350-da76ac5890ee662cb8026ea07a0566c61889df4a.tar.bz2
scummvm-rg350-da76ac5890ee662cb8026ea07a0566c61889df4a.zip
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
svn-id: r12680
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8916b44038..926d73ca92 100644
--- a/Makefile
+++ b/Makefile
@@ -15,19 +15,22 @@ CP := cp
# 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 @@ CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy
# 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'"