[Scummvm-cvs-logs] CVS: scummvm common.rules,1.14,1.15
Max Horn
fingolfin at users.sourceforge.net
Thu May 6 02:59:04 CEST 2004
Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17634
Modified Files:
common.rules
Log Message:
Fixed & cleaned up common rules; this fixes the convenience target when doing a plugins build; and also fixes a bug which could cause plugins to be built against an old version of the main executable
Index: common.rules
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common.rules,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- common.rules 25 Feb 2004 10:05:50 -0000 1.14
+++ common.rules 6 May 2004 09:58:48 -0000 1.15
@@ -1,7 +1,9 @@
# Common build rules, used by the sub modules and their module.mk files
+# Copy the list of objects to a new variable. The name of the new variable
+# contains the module name, a trick we use so we can keep multiple different
+# module object lists, one for each module.
MODULE_OBJS-$(MODULE) := $(MODULE_OBJS)
-MODULE_LIB-$(MODULE) := $(MODULE)/lib$(notdir $(MODULE)).a
ifdef PLUGIN
# Plugin build rule
@@ -14,19 +16,15 @@
PLUGIN:=
plugins: $(PLUGIN-$(MODULE))
+# Pseudo target for comfort, allows for "make common", "make gui" etc.
+$(MODULE): $(PLUGIN-$(MODULE))
+
else
+MODULE_LIB-$(MODULE) := $(MODULE)/lib$(notdir $(MODULE)).a
+
# If not building as a plugin, add the object files to the main OBJS list
OBJS += $(MODULE_LIB-$(MODULE))
-endif
-
-
-# Clean target, removes all object files. This looks a bit hackish, as we have to
-# copy the content of MODULE_OBJS to another unique variable (the next module.mk
-# will overwrite it after all). The same for the libMODULE.a library file.
-clean: clean-$(MODULE)
-clean-$(MODULE): clean-% :
- -$(RM) $(MODULE_OBJS-$*) $(MODULE_LIB-$*) $(PLUGIN-$*)
# Convenience library target
$(MODULE_LIB-$(MODULE)): $(MODULE_OBJS)
@@ -34,8 +32,17 @@
$(AR) $@ $+
$(RANLIB) $@
-
# Pseudo target for comfort, allows for "make common", "make gui" etc.
$(MODULE): $(MODULE_LIB-$(MODULE))
+endif
+
+
+# Clean target, removes all object files. This looks a bit hackish, as we have to
+# copy the content of MODULE_OBJS to another unique variable (the next module.mk
+# will overwrite it after all). The same for the libMODULE.a library file.
+clean: clean-$(MODULE)
+clean-$(MODULE): clean-% :
+ -$(RM) $(MODULE_OBJS-$*) $(MODULE_LIB-$*) $(PLUGIN-$*)
+
.PHONY: clean-$(MODULE) $(MODULE)
More information about the Scummvm-git-logs
mailing list