aboutsummaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-13 12:57:32 +0200
committerEugene Sandulenko2017-08-13 12:57:32 +0200
commit933d634c32c3ed3470a082b6d3560e737ef250b1 (patch)
treeb2da87245000bfce79c7629a625eca533e50f0c4 /rules.mk
parent17625a640380fe9cee4b8ecda0cabf037cdffa3e (diff)
downloadscummvm-rg350-933d634c32c3ed3470a082b6d3560e737ef250b1.tar.gz
scummvm-rg350-933d634c32c3ed3470a082b6d3560e737ef250b1.tar.bz2
scummvm-rg350-933d634c32c3ed3470a082b6d3560e737ef250b1.zip
CONFIGURE: An (unsuccessful) attempt to add library dependencies to the tools
For some reason I cannot figure out how to enforce proper variable creation in a generic way. I'll keep reading the docs but maybe someone else could figure it out earlier
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index 5ab3754768..2df8307c85 100644
--- a/rules.mk
+++ b/rules.mk
@@ -20,12 +20,20 @@ ifdef TOOL_EXECUTABLE
# TODO: Refactor this, so that even our master executable can use this rule?
################################################
TOOL-$(MODULE) := $(MODULE)/$(TOOL_EXECUTABLE)$(EXEEXT)
+TOOL_CFLAGS-$(MODULE) := $(TOOL_CFLAGS)
+TOOL_LIBS-$(MODULE) := $(TOOL_LIBS)
+
+$(TOOL-$(MODULE)): TOOL_LIBS = $(TOOL_LIBS-$(MODULE))
+$(TOOL-$(MODULE)): TOOL_CFLAGS = $(TOOL_CFLAGS-$(MODULE))
+
$(TOOL-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(TOOL_DEPS)
- $(QUIET_CXX)$(CXX) $(LDFLAGS) $+ -o $@
+ $(QUIET_CXX)$(CXX) $(LDFLAGS) $(TOOL_CFLAGS) $+ $(TOOL_LIBS) -o $@
# Reset TOOL_* vars
TOOL_EXECUTABLE:=
TOOL_DEPS:=
+TOOL_CFLAGS:=
+TOOL_LIBS:=
# Add to "devtools" target
devtools: $(TOOL-$(MODULE))