summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-12-25 09:50:56 +0000
committerbjarni <bjarni@openttd.org>2006-12-25 09:50:56 +0000
commit0cfecfbe3c2c9539717caa75646bffa3b9bca15c (patch)
treeb8b317a0965b2e2fba582cb614a2f89a1fd71f0c /Makefile
parent8e20ae2e9574ed613fd95a07fad12ce0e7f2bfa5 (diff)
downloadopenttd-0cfecfbe3c2c9539717caa75646bffa3b9bca15c.tar.xz
(svn r7557) -Fix: [OSX] FS#463 libfontconfig not present on OSX by default
By adding CUSTOM_FONTCONFIG flag to the Makefile (not Makefile.config) to overwrite default locations of this library This allows static linking
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 21cbf43ad..113496dc6 100644
--- a/Makefile
+++ b/Makefile
@@ -101,6 +101,8 @@
# CYGWIN: build in Cygwin environment
# MINGW: build with MingW compiler, link with MingW libraries
#
+# CUSTOM_FONTCONFIG: use a custom name/path to the libfontconfig library. Useful for static linking
+#
# VERBOSE: show full compiler invocations instead of brief progress messages
#
# Special for crosscompiling there are some commands available:
@@ -523,6 +525,13 @@ ifdef WITH_FONTCONFIG
CDEFS += -DWITH_FONTCONFIG
CCFLAGS_FONTCONFIG := $(shell $(FONTCONFIG_CONFIG) --cflags)
LDFLAGS_FONTCONFIG := $(shell $(FONTCONFIG_CONFIG) --libs)
+
+ifdef CUSTOM_FONTCONFIG
+# To allow usage of non-default libs, such as absolute path to static libs
+# not stored in Makefile.config
+LDFLAGS_FONTCONFIG := $(CUSTOM_FONTCONFIG)
+endif
+
CFLAGS += $(CCFLAGS_FONTCONFIG)
LIBS += $(LDFLAGS_FONTCONFIG)
endif