summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-06-19 17:05:24 +0000
committerbjarni <bjarni@openttd.org>2005-06-19 17:05:24 +0000
commit1a96770d81d359397dc682e73a3db32041df04ab (patch)
tree47c6fb4b2ff3e0ab03934fe92ff146c4d4f651ae /Makefile
parent4754dad0d65a969dc8ab6eea824fe34c40c52e89 (diff)
downloadopenttd-1a96770d81d359397dc682e73a3db32041df04ab.tar.xz
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
useful if you for some reason got a libpng-config, which is called something else
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 125ed2fd6..f70f4719d 100644
--- a/Makefile
+++ b/Makefile
@@ -149,6 +149,10 @@ else
CONFIG_INCLUDED:=1
endif
+ifndef LIBPNG-CONFIG
+LIBPNG-CONFIG :=libpng-config
+endif
+
# updates Makefile.config if it's outdated
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
ifndef MANUAL_CONFIG # manual config should not check this
@@ -461,19 +465,19 @@ endif
# libpng config
ifdef WITH_PNG
CDEFS += -DWITH_PNG
-CFLAGS += $(shell libpng-config --cflags)
+CFLAGS += $(shell $(LIBPNG-CONFIG) --cflags)
# seems like older libpng versions are broken and need this
PNGCONFIG_FLAGS = --ldflags --libs
ifdef STATIC
ifdef OSX
# Seems like we need a tiny hack for OSX static to work
-LIBS += $(shell libpng-config --prefix)/lib/libpng.a
+LIBS += $(shell $(LIBPNG-CONFIG) --prefix)/lib/libpng.a
else
-LIBS += $(shell libpng-config --static $(PNGCONFIG_FLAGS))
+LIBS += $(shell $(LIBPNG-CONFIG) --static $(PNGCONFIG_FLAGS))
endif
else
-LIBS += $(shell libpng-config --L_opts $(PNGCONFIG_FLAGS))
+LIBS += $(shell $(LIBPNG-CONFIG) --L_opts $(PNGCONFIG_FLAGS))
endif
endif