aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-09-17 21:53:13 +0000
committerMax Horn2003-09-17 21:53:13 +0000
commit231cb16b5b68cf21f33869b004a3d449489d0450 (patch)
tree3a5a08aac8868a3a591099f294c6df6fad668154
parent468275bb94f975b9e1c2e7e90a03caa37bd0e142 (diff)
downloadscummvm-rg350-231cb16b5b68cf21f33869b004a3d449489d0450.tar.gz
scummvm-rg350-231cb16b5b68cf21f33869b004a3d449489d0450.tar.bz2
scummvm-rg350-231cb16b5b68cf21f33869b004a3d449489d0450.zip
some tweaks to the build system (work toward plugin support)
svn-id: r10279
-rw-r--r--Makefile5
-rw-r--r--Makefile.common16
-rw-r--r--backends/module.mk9
-rw-r--r--common/module.mk5
-rwxr-xr-xconfigure4
-rw-r--r--gui/module.mk5
-rw-r--r--scumm/module.mk10
-rw-r--r--simon/module.mk5
-rw-r--r--sky/module.mk7
-rw-r--r--sound/module.mk5
-rw-r--r--sword2/module.mk7
11 files changed, 56 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 9e8dd7943b..61090ef34d 100644
--- a/Makefile
+++ b/Makefile
@@ -23,13 +23,16 @@ INCLUDES:= -I. -Icommon
LIBS :=
OBJS :=
+MODULES :=
+MODULE_DIRS :=
+
# Load the make rules generated by configure
include config.mak
# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Wshadow -Werror
-CXXFLAGS:= -O -Wall -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas $(CXXFLAGS)
+CXXFLAGS:= -O -fno-inline -Wall -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas $(CXXFLAGS)
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
diff --git a/Makefile.common b/Makefile.common
index 96be52df31..9e86893506 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -48,7 +48,7 @@ PLUGIN_SUFFIX := .a
ifdef DISABLE_SCUMM
DEFINES += -DDISABLE_SCUMM
else
-MODULES += scumm scumm/smush
+MODULES += scumm
endif
ifdef DISABLE_SIMON
@@ -60,23 +60,19 @@ endif
ifdef DISABLE_SKY
DEFINES += -DDISABLE_SKY
else
-MODULES += sky sky/compacts sky/music
+MODULES += sky
endif
ifdef DISABLE_SWORD2
DEFINES += -DDISABLE_SWORD2
else
-MODULES += bs2 bs2/driver
+MODULES += bs2
endif
# After the game specific modules follow the shared modules
MODULES += \
gui \
backends \
- backends/fs/posix \
- backends/fs/morphos \
- backends/fs/windows \
- backends/midi \
sound \
common
@@ -97,6 +93,10 @@ CPPFLAGS:= $(DEFINES) $(INCLUDES)
# the build date in gScummVMBuildDate is correct.
common/main.o: $(OBJS)
+# Some files depend on the values of the DISABLE_* flags; we let these
+# depend on config.mak, so that they get recompiled if config.mak changes.
+common/plugins.o common/gameDetector.o: config.mak
+
# HACK temporary fix to get compilation on OS X (and possibly others) working again
OBJS:=common/main.o common/gameDetector.o $(OBJS)
@@ -108,7 +108,7 @@ clean:
.PHONY: all clean dist distclean
-DEPDIRS = $(addsuffix /$(DEPDIR),$(MODULES))
+DEPDIRS = $(addsuffix /$(DEPDIR),$(MODULE_DIRS))
DEPFILES = $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
# Old (dumb) compile & dependcy rules
diff --git a/backends/module.mk b/backends/module.mk
index 92eb6dca37..bb10fa7bb5 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -1,6 +1,6 @@
MODULE := backends
-MODULE_OBJS = \
+MODULE_OBJS := \
backends/fs/posix/posix-fs.o \
backends/fs/morphos/abox-fs.o \
backends/fs/windows/windows-fs.o \
@@ -13,5 +13,12 @@ MODULE_OBJS = \
backends/midi/alsa.o \
backends/midi/windows.o
+MODULE_DIRS += \
+ backends \
+ backends/fs/posix \
+ backends/fs/morphos \
+ backends/fs/windows \
+ backends/midi
+
# Include common rules
include common.rules
diff --git a/common/module.mk b/common/module.mk
index 34304cc7ad..9e0ade9533 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -1,6 +1,6 @@
MODULE := common
-MODULE_OBJS = \
+MODULE_OBJS := \
common/config-file.o \
common/engine.o \
common/file.o \
@@ -11,5 +11,8 @@ MODULE_OBJS = \
common/util.o \
common/savefile.o
+MODULE_DIRS += \
+ common
+
# Include common rules
include common.rules
diff --git a/configure b/configure
index 31e3f24f12..9f7b9dcb7e 100755
--- a/configure
+++ b/configure
@@ -516,6 +516,7 @@ case $_backend in
LIBS="$LIBS `$_sdlconfig --libs`"
OBJS="$OBJS backends/sdl/sdl-common.o backends/sdl/sdl.o"
MODULES="$MODULES backends/sdl"
+ MODULE_DIRS="$MODULE_DIRS backends/sdl"
;;
sdlgl)
find_sdlconfig
@@ -523,6 +524,7 @@ case $_backend in
LIBS="$LIBS `$_sdlconfig --libs` -lGL"
OBJS="$OBJS backends/sdl/sdl-common.o backends/sdl/sdl_gl.o"
MODULES="$MODULES backends/sdl"
+ MODULE_DIRS="$MODULE_DIRS backends/sdl"
;;
x11)
INCLUDES="$INCLUDES -I/usr/X11R6/include"
@@ -531,6 +533,7 @@ case $_backend in
OBJS="$OBJS backends/x11/x11.o"
DEFINES="$DEFINES -DX11_BACKEND"
MODULES="$MODULES backends/x11"
+ MODULE_DIRS="$MODULE_DIRS backends/x11"
;;
*)
echo "support for $_backend backend not implemented in configure script yet"
@@ -578,6 +581,7 @@ LIBS := $LIBS
RANLIB := $_ranlib
BACKEND := $_backend
MODULES += $MODULES
+MODULE_DIRS += $MODULE_DIRS
$_make_def_HAVE_GCC3
$_mak_scumm
diff --git a/gui/module.mk b/gui/module.mk
index 76c4ee2084..e04af24355 100644
--- a/gui/module.mk
+++ b/gui/module.mk
@@ -1,6 +1,6 @@
MODULE := gui
-MODULE_OBJS = \
+MODULE_OBJS := \
gui/about.o \
gui/browser.o \
gui/chooser.o \
@@ -16,5 +16,8 @@ MODULE_OBJS = \
gui/ScrollBarWidget.o \
gui/widget.o \
+MODULE_DIRS += \
+ gui
+
# Include common rules
include common.rules
diff --git a/scumm/module.mk b/scumm/module.mk
index 1d5a606e78..1fb64fe684 100644
--- a/scumm/module.mk
+++ b/scumm/module.mk
@@ -1,6 +1,6 @@
MODULE := scumm
-SCUMM_OBJS = \
+MODULE_OBJS := \
scumm/actor.o \
scumm/akos.o \
scumm/base-costume.o \
@@ -40,9 +40,7 @@ SCUMM_OBJS = \
scumm/string.o \
scumm/usage_bits.o \
scumm/vars.o \
- scumm/verbs.o
-
-SMUSH_OBJS = \
+ scumm/verbs.o \
scumm/smush/chunk.o \
scumm/smush/codec1.o \
scumm/smush/codec37.o \
@@ -53,7 +51,9 @@ SMUSH_OBJS = \
scumm/smush/smush_mixer.o \
scumm/smush/smush_font.o
-MODULE_OBJS = $(SCUMM_OBJS) $(SMUSH_OBJS)
+MODULE_DIRS += \
+ scumm \
+ scumm/smush
# Include common rules
include common.rules
diff --git a/simon/module.mk b/simon/module.mk
index 330fc34ba6..2e57a98460 100644
--- a/simon/module.mk
+++ b/simon/module.mk
@@ -1,6 +1,6 @@
MODULE := simon
-MODULE_OBJS = \
+MODULE_OBJS := \
simon/charset.o \
simon/debug.o \
simon/items.o \
@@ -12,5 +12,8 @@ MODULE_OBJS = \
simon/verb.o \
simon/vga.o \
+MODULE_DIRS += \
+ simon
+
# Include common rules
include common.rules
diff --git a/sky/module.mk b/sky/module.mk
index d7cee9c46d..eba12e9a15 100644
--- a/sky/module.mk
+++ b/sky/module.mk
@@ -1,6 +1,6 @@
MODULE := sky
-MODULE_OBJS = \
+MODULE_OBJS := \
sky/autoroute.o \
sky/compact.o \
sky/debug.o \
@@ -24,5 +24,10 @@ MODULE_OBJS = \
sky/music/musicbase.o \
sky/compacts/savedata.o \
+MODULE_DIRS += \
+ sky \
+ sky/music \
+ sky/compacts
+
# Include common rules
include common.rules
diff --git a/sound/module.mk b/sound/module.mk
index 3080d4c3da..50072c0b5b 100644
--- a/sound/module.mk
+++ b/sound/module.mk
@@ -1,6 +1,6 @@
MODULE := sound
-MODULE_OBJS = \
+MODULE_OBJS := \
sound/audiostream.o \
sound/fmopl.o \
sound/midiparser.o \
@@ -12,5 +12,8 @@ MODULE_OBJS = \
sound/voc.o
# sound/resample.o \
+MODULE_DIRS += \
+ sound
+
# Include common rules
include common.rules
diff --git a/sword2/module.mk b/sword2/module.mk
index b5892f6204..e15914f2ec 100644
--- a/sword2/module.mk
+++ b/sword2/module.mk
@@ -1,6 +1,6 @@
MODULE := bs2
-MODULE_OBJS = \
+MODULE_OBJS := \
bs2/anims.o \
bs2/build_display.o \
bs2/console.o \
@@ -40,7 +40,10 @@ MODULE_OBJS = \
bs2/driver/rdwin.o \
bs2/driver/render.o \
bs2/driver/sprite.o
-
+
+MODULE_DIRS += \
+ bs2 \
+ bs2/driver
# Include common rules
include common.rules