[Scummvm-git-logs] scummvm master -> 933d634c32c3ed3470a082b6d3560e737ef250b1

sev- sev at scummvm.org
Sun Aug 13 12:59:09 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
933d634c32 CONFIGURE: An (unsuccessful) attempt to add library dependencies to the tools


Commit: 933d634c32c3ed3470a082b6d3560e737ef250b1
    https://github.com/scummvm/scummvm/commit/933d634c32c3ed3470a082b6d3560e737ef250b1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-13T12:57:32+02:00

Commit Message:
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

Changed paths:
    configure
    devtools/create_titanic/module.mk
    rules.mk


diff --git a/configure b/configure
index 57607bb..4d8c235 100755
--- a/configure
+++ b/configure
@@ -4132,7 +4132,8 @@ EOF
 	cc_check $ZLIB_CFLAGS $ZLIB_LIBS -lz && _zlib=yes
 fi
 if test "$_zlib" = yes ; then
-	append_var LIBS "$ZLIB_LIBS -lz"
+	append_var ZLIB_LIBS "-lz"
+	append_var LIBS "$ZLIB_LIBS"
 	append_var INCLUDES "$ZLIB_CFLAGS"
 fi
 define_in_config_if_yes "$_zlib" 'USE_ZLIB'
@@ -5193,6 +5194,8 @@ EXEPRE := $HOSTEXEPRE
 EXEEXT := $HOSTEXEEXT
 NASM := $NASM
 NASMFLAGS := $NASMFLAGS
+ZLIB_LIBS := $ZLIB_LIBS
+ZLIB_CFLAGS := $ZLIB_CFLAGS
 
 prefix = $prefix
 exec_prefix = $exec_prefix
diff --git a/devtools/create_titanic/module.mk b/devtools/create_titanic/module.mk
index a762af3..b86fe18 100644
--- a/devtools/create_titanic/module.mk
+++ b/devtools/create_titanic/module.mk
@@ -1,4 +1,6 @@
 
+ifdef USE_ZLIB
+
 MODULE := devtools/create_titanic
 
 MODULE_OBJS := \
@@ -19,5 +21,10 @@ MODULE_OBJS := \
 # Set the name of the executable
 TOOL_EXECUTABLE := create_titanic
 
+TOOL_CFLAGS := $(ZLIB_CFLAGS)
+TOOL_LIBS := $(ZLIB_LIBS)
+
 # Include common rules
 include $(srcdir)/rules.mk
+
+endif
diff --git a/rules.mk b/rules.mk
index 5ab3754..2df8307 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))





More information about the Scummvm-git-logs mailing list