diff options
-rw-r--r-- | Makefile.common | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.common b/Makefile.common index 95b090acd3..3d2739f9bf 100644 --- a/Makefile.common +++ b/Makefile.common @@ -136,6 +136,10 @@ ifdef CXX_UPDATE_DEP_FLAG $(QUIET)$(MKDIR) $(*D)/$(DEPDIR) $(QUIET_AS)$(CXX) $(CXX_UPDATE_DEP_FLAG) $(ASFLAGS) -c $(<) -o $*.o +base/version.o: base/version.cpp + $(QUIET)$(MKDIR) $(*D)/$(DEPDIR) + $(QUIET_CXX)$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(VERFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + else # Dumb compile rule, for C++ compilers that don't allow dependency tracking or @@ -149,6 +153,9 @@ else $(QUIET)$(MKDIR) $(*D) $(QUIET_AS)$(CXX) $(ASFLAGS) -c $(<) -o $*.o +base/version.o: base/version.cpp + $(QUIET)$(MKDIR) $(*D) + $(QUIET_CXX)$(CXX) $(CXXFLAGS) $(VERFLAGS) $(CPPFLAGS) -c $(<) -o $*.o endif # Build rule for assembler files @@ -192,7 +199,7 @@ VER_EXTRA = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c2-) ifdef AMIGAOS # Amiga needs date in specific format for the version cookie AMIGA_DATE = $(shell gdate '+%d.%m.%Y') -base/version.o: CXXFLAGS:=$(CXXFLAGS) -DAMIGA_DATE=\"$(AMIGA_DATE)\" +VERFLAGS += -DAMIGA_DATE=\"$(AMIGA_DATE)\" endif ###################################################################### @@ -214,7 +221,7 @@ endif # Define the Subversion revision if available, either autodetected or # specified by the user, but only for base/version.cpp. ifneq ($(origin VER_REV), undefined) -base/version.o: CXXFLAGS:=$(CXXFLAGS) -DSCUMMVM_REVISION=\"$(VER_REV)\" +VERFLAGS += -DSCUMMVM_REVISION=\"$(VER_REV)\" endif ###################################################################### |