summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2015-02-21 18:10:46 +1100
committer Vas Crabb <vas@vastheman.com>2015-02-21 18:17:19 +1100
commitff1b4845990c6b2abbb3e966c1a1aca40d2495a0 (patch)
treec0fc801c91713e24a085e257fe4823ddbc70c95c /makefile
parenta7eb44f3e256e420cc956c9f6ea0a30b220d544f (diff)
Re-link emulator binary if version source file changes
Diffstat (limited to 'makefile')
-rw-r--r--makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/makefile b/makefile
index 830e20b0a18..d4534f5310c 100644
--- a/makefile
+++ b/makefile
@@ -943,14 +943,14 @@ else
EMULATOROBJ = $(EMULATOROBJLIST)
endif
-$(EMULATOR): $(EMULATOROBJ)
+$(EMULATOR): $(EMULATOROBJ) $(SRC)/version.c
$(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
@echo Linking $@...
ifeq ($(TARGETOS),emscripten)
# Emscripten's linker seems to be stricter about the ordering of files
- $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $^ -Wl,--end-group $(LIBS) -o $@
+ $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $(EMULATOROBJ) -Wl,--end-group $(LIBS) -o $@
else
- $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $@
+ $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $(EMULATOROBJ) $(LIBS) -o $@
endif
ifeq ($(TARGETOS),win32)
ifdef SYMBOLS