1
0
Fork 0

(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used

release/0.5
tron 2006-11-07 15:58:54 +00:00
parent 1dd5dfd3b3
commit e37b5d13bd
1 changed files with 6 additions and 4 deletions

View File

@ -469,20 +469,22 @@ endif
# libpng config # libpng config
ifdef WITH_PNG ifdef WITH_PNG
CDEFS += -DWITH_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 # seems like older libpng versions are broken and need this
PNGCONFIG_FLAGS = --ldflags --libs PNGCONFIG_FLAGS = --ldflags --libs
ifdef STATIC ifdef STATIC
ifdef OSX ifdef OSX
# Seems like we need a tiny hack for OSX static to work # 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 else
LIBS += $(shell $(LIBPNG_CONFIG) --static $(PNGCONFIG_FLAGS)) LDFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --static $(PNGCONFIG_FLAGS))
endif endif
else else
LIBS += $(shell $(LIBPNG_CONFIG) --L_opts $(PNGCONFIG_FLAGS)) LDFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --L_opts $(PNGCONFIG_FLAGS))
endif endif
LIBS += $(LDFLAGS_PNG)
endif endif
# use std C++ lib: # use std C++ lib: