aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--Makefile.common2
-rw-r--r--README2
-rw-r--r--backends/module.mk12
-rw-r--r--backends/null/module.mk4
-rw-r--r--backends/sdl/module.mk4
-rw-r--r--backends/x11/module.mk4
-rw-r--r--base/module.mk5
-rw-r--r--common/module.mk5
-rwxr-xr-xconfigure4
-rw-r--r--engines/agi/module.mk5
-rw-r--r--engines/cine/module.mk5
-rw-r--r--engines/gob/module.mk5
-rw-r--r--engines/kyra/module.mk5
-rw-r--r--engines/lure/module.mk5
-rw-r--r--engines/queen/module.mk5
-rw-r--r--engines/saga/module.mk5
-rw-r--r--engines/scumm/module.mk10
-rw-r--r--engines/simon/module.mk5
-rw-r--r--engines/sky/module.mk7
-rw-r--r--engines/sword1/module.mk5
-rw-r--r--engines/sword2/module.mk5
-rw-r--r--graphics/module.mk7
-rw-r--r--gui/module.mk5
-rw-r--r--rules.mk (renamed from common.rules)4
-rw-r--r--sound/module.mk6
-rw-r--r--sound/softsynth/mt32/module.mk5
-rw-r--r--tools/module.mk2
28 files changed, 36 insertions, 106 deletions
diff --git a/Makefile b/Makefile
index a46bc8b868..8f03a4bc0a 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ MODULES :=
MODULE_DIRS :=
# Load the make rules generated by configure
-include config.mak
+include config.mk
CXXFLAGS:= -Wall $(CXXFLAGS)
CXXFLAGS+= -O -Wuninitialized
@@ -38,7 +38,7 @@ EXECUTABLE := scummvm$(EXEEXT)
include $(srcdir)/Makefile.common
# check if configure has been run or has been changed since last run
-config.mak: $(srcdir)/configure
+config.mk: $(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."
@exit 1
diff --git a/Makefile.common b/Makefile.common
index 232002dfe3..4c151ebb76 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -81,7 +81,7 @@ $(EXECUTABLE): $(OBJS)
distclean: clean
$(RM_REC) $(DEPDIRS)
- $(RM) build.rules config.h config.mak config.log
+ $(RM) build.rules config.h config.mk config.log
clean:
$(RM) $(OBJS) $(EXECUTABLE)
diff --git a/README b/README
index ef2e83791b..264237ebfa 100644
--- a/README
+++ b/README
@@ -1478,7 +1478,7 @@ messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).
* Type ./configure --host=ppc-amigaos
* If you got an error about sdl-config, use --with-sdl-prefix
parameter to set the path.
- * Check 'config.mak' file and if everything seems to fine:
+ * Check 'config.mk' file and if everything seems to be fine:
* Run 'make'.
* Cross-compiling with Linux may be as easy.
diff --git a/backends/module.mk b/backends/module.mk
index e59d76cb88..54eb0fbe83 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -14,15 +14,5 @@ MODULE_OBJS := \
midi/seq.o \
midi/windows.o
-MODULE_DIRS += \
- backends \
- backends/fs \
- backends/fs/posix \
- backends/fs/morphos \
- backends/fs/windows \
- backends/fs/amigaos4 \
- backends/fs/dc \
- backends/midi
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/backends/null/module.mk b/backends/null/module.mk
index 29a16f7a0a..d8f2161a2e 100644
--- a/backends/null/module.mk
+++ b/backends/null/module.mk
@@ -4,7 +4,7 @@ MODULE_OBJS := \
null.o
MODULE_DIRS += \
- backends/null
+ backends/null/
-# We don't use the common.rules here on purpose
+# We don't use the rules.mk here on purpose
OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
diff --git a/backends/sdl/module.mk b/backends/sdl/module.mk
index 4006354e5e..fd9e314076 100644
--- a/backends/sdl/module.mk
+++ b/backends/sdl/module.mk
@@ -6,7 +6,7 @@ MODULE_OBJS := \
sdl.o
MODULE_DIRS += \
- backends/sdl
+ backends/sdl/
-# We don't use the common.rules here on purpose
+# We don't use the rules.mk here on purpose
OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
diff --git a/backends/x11/module.mk b/backends/x11/module.mk
index c9a3908e2f..7350708299 100644
--- a/backends/x11/module.mk
+++ b/backends/x11/module.mk
@@ -4,7 +4,7 @@ MODULE_OBJS := \
x11.o
MODULE_DIRS += \
- backends/x11
+ backends/x11/
-# We don't use the common.rules here on purpose
+# We don't use the rules.mk here on purpose
OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
diff --git a/base/module.mk b/base/module.mk
index 3a515b4f5c..9f8f31c0a3 100644
--- a/base/module.mk
+++ b/base/module.mk
@@ -7,8 +7,5 @@ MODULE_OBJS := \
plugins.o \
version.o
-MODULE_DIRS += \
- base
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/common/module.mk b/common/module.mk
index 9d1908f925..9b82ebd626 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -16,8 +16,5 @@ MODULE_OBJS := \
system.o \
unzip.o
-MODULE_DIRS += \
- common
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/configure b/configure
index a90415c672..1102a44792 100755
--- a/configure
+++ b/configure
@@ -1393,8 +1393,8 @@ $_def_plugin
#endif /* CONFIG_H */
EOF
-echo "Creating config.mak"
-cat > config.mak << EOF
+echo "Creating config.mk"
+cat > config.mk << EOF
# -------- Generated by configure -----------
CXX := $CXX
diff --git a/engines/agi/module.mk b/engines/agi/module.mk
index a5a81f2b15..b155a12c9b 100644
--- a/engines/agi/module.mk
+++ b/engines/agi/module.mk
@@ -30,13 +30,10 @@ MODULE_OBJS = \
view.o \
words.o
-MODULE_DIRS += \
- engines/agi
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/cine/module.mk b/engines/cine/module.mk
index dd26b39785..88106bb51b 100644
--- a/engines/cine/module.mk
+++ b/engines/cine/module.mk
@@ -23,13 +23,10 @@ MODULE_OBJS = \
unpack.o \
various.o
-MODULE_DIRS += \
- engines/cine
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index 4841db606d..c892039015 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -44,13 +44,10 @@ MODULE_OBJS := \
video_v1.o \
video_v2.o
-MODULE_DIRS += \
- engines/gob
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk
index dbede17bf6..2b83e6dc26 100644
--- a/engines/kyra/module.mk
+++ b/engines/kyra/module.mk
@@ -26,13 +26,10 @@ MODULE_OBJS := \
vqa.o \
wsamovie.o
-MODULE_DIRS += \
- engines/kyra
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/lure/module.mk b/engines/lure/module.mk
index f742b116dc..35a39e9774 100644
--- a/engines/lure/module.mk
+++ b/engines/lure/module.mk
@@ -23,14 +23,11 @@ MODULE_OBJS := \
surface.o \
system.o
-MODULE_DIRS += \
- engines/lure
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/queen/module.mk b/engines/queen/module.mk
index dc8aa7bcdc..f603e0a736 100644
--- a/engines/queen/module.mk
+++ b/engines/queen/module.mk
@@ -22,13 +22,10 @@ MODULE_OBJS := \
talk.o \
walk.o
-MODULE_DIRS += \
- engines/queen
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/saga/module.mk b/engines/saga/module.mk
index 97780c1aae..205e243a72 100644
--- a/engines/saga/module.mk
+++ b/engines/saga/module.mk
@@ -32,13 +32,10 @@ MODULE_OBJS := \
music.o \
sound.o
-MODULE_DIRS += \
- engines/saga
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index faf263e1f0..ab81e835dc 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -99,14 +99,6 @@ MODULE_OBJS += \
he/wiz_he.o
endif
-MODULE_DIRS += \
- engines/scumm \
- engines/scumm/he \
- engines/scumm/imuse \
- engines/scumm/imuse_digi \
- engines/scumm/insane \
- engines/scumm/smush
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
@@ -115,4 +107,4 @@ PLUGIN_LDFLAGS += -lz
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/simon/module.mk b/engines/simon/module.mk
index 4006a99ebc..dfd6a3e56b 100644
--- a/engines/simon/module.mk
+++ b/engines/simon/module.mk
@@ -24,13 +24,10 @@ MODULE_OBJS := \
vga.o \
window.o \
-MODULE_DIRS += \
- engines/simon
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/sky/module.mk b/engines/sky/module.mk
index 6858725c5d..7d53615bd0 100644
--- a/engines/sky/module.mk
+++ b/engines/sky/module.mk
@@ -23,15 +23,10 @@ MODULE_OBJS := \
music/mt32music.o \
music/musicbase.o
-MODULE_DIRS += \
- engines/sky \
- engines/sky/music \
- engines/sky/compacts
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/sword1/module.mk b/engines/sword1/module.mk
index 124158bfad..5db32e57c1 100644
--- a/engines/sword1/module.mk
+++ b/engines/sword1/module.mk
@@ -20,13 +20,10 @@ MODULE_OBJS := \
sword1.o \
text.o
-MODULE_DIRS += \
- engines/sword1
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/engines/sword2/module.mk b/engines/sword2/module.mk
index f5e79af317..25d73ab775 100644
--- a/engines/sword2/module.mk
+++ b/engines/sword2/module.mk
@@ -33,13 +33,10 @@ MODULE_OBJS := \
sync.o \
walker.o
-MODULE_DIRS += \
- engines/sword2
-
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/graphics/module.mk b/graphics/module.mk
index d5566996d7..3479bd1bf3 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -41,10 +41,5 @@ endif
endif
-MODULE_DIRS += \
- graphics \
- graphics/fonts \
- graphics/scaler
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/gui/module.mk b/gui/module.mk
index b0cb408505..4ec0140be8 100644
--- a/gui/module.mk
+++ b/gui/module.mk
@@ -23,8 +23,5 @@ MODULE_OBJS := \
ThemeNew.o \
theme-config.o
-MODULE_DIRS += \
- gui
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/common.rules b/rules.mk
index 52b030b1c1..f1f1888095 100644
--- a/common.rules
+++ b/rules.mk
@@ -5,6 +5,10 @@
# module object lists, one for each module.
MODULE_OBJS-$(MODULE) := $(addprefix $(MODULE)/, $(MODULE_OBJS))
+# Add all involved directories to the MODULE_DIRS list
+MODULE_DIRS += $(sort $(dir $(MODULE_OBJS-$(MODULE))))
+
+
ifdef PLUGIN
# Plugin build rule
# TODO: Right now, for Mac OS X only. We either will have to generate this
diff --git a/sound/module.mk b/sound/module.mk
index 4fc43c34d6..f4ba8eeed4 100644
--- a/sound/module.mk
+++ b/sound/module.mk
@@ -23,9 +23,5 @@ MODULE_OBJS := \
softsynth/fluidsynth.o \
softsynth/mt32.o \
-MODULE_DIRS += \
- sound \
- sound/softsynth
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/sound/softsynth/mt32/module.mk b/sound/softsynth/mt32/module.mk
index ab13e750bb..ac208a563f 100644
--- a/sound/softsynth/mt32/module.mk
+++ b/sound/softsynth/mt32/module.mk
@@ -10,8 +10,5 @@ MODULE_OBJS := \
tables.o \
freeverb.o
-MODULE_DIRS += \
- sound/softsynth/mt32
-
# Include common rules
-include $(srcdir)/common.rules
+include $(srcdir)/rules.mk
diff --git a/tools/module.mk b/tools/module.mk
index b17584b617..dd44b415bf 100644
--- a/tools/module.mk
+++ b/tools/module.mk
@@ -1,7 +1,7 @@
MODULE := tools
MODULE_DIRS += \
- tools
+ tools/
#######################################################################