Mercurial > hg > openttd
changeset 5051:e5d5f9f7ecea draft
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
author | tron <tron@openttd.org> |
---|---|
date | Tue, 07 Nov 2006 15:58:54 +0000 |
parents | 55641677e55b |
children | a0b57cd462c4 |
files | Makefile |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile +++ b/Makefile @@ -469,20 +469,22 @@ # 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: