diff options
author | tron <tron@openttd.org> | 2006-11-07 15:58:54 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-11-07 15:58:54 +0000 |
commit | dd29f9d9646152803046faac04f2731546bb8765 (patch) | |
tree | bf1835df12decb38d730d0a8debb5b75a24c9d22 /Makefile | |
parent | b92ccb7a9834eed4bf4fdc561766f0c5fb28c8a8 (diff) | |
download | openttd-dd29f9d9646152803046faac04f2731546bb8765.tar.xz |
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -469,20 +469,22 @@ endif # libpng config ifdef WITH_PNG CDEFS += -DWITH_PNG -CFLAGS += $(shell $(LIBPNG_CONFIG) --cppflags --I_opts) +CCFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --cppflags --I_opts) +CFLAGS += $(CCFLAGS_PNG) # 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 +LDFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --prefix)/lib/libpng.a else -LIBS += $(shell $(LIBPNG_CONFIG) --static $(PNGCONFIG_FLAGS)) +LDFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --static $(PNGCONFIG_FLAGS)) endif else -LIBS += $(shell $(LIBPNG_CONFIG) --L_opts $(PNGCONFIG_FLAGS)) +LDFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --L_opts $(PNGCONFIG_FLAGS)) endif +LIBS += $(LDFLAGS_PNG) endif # use std C++ lib: |