Makefile
changeset 1955 52a84e880864
parent 1952 499b7bd9f63c
child 1985 c4ec1653a337
equal deleted inserted replaced
1954:58fee2f9eb81 1955:52a84e880864
   145 # See target section for how this is built, suppress errors
   145 # See target section for how this is built, suppress errors
   146 # since first time it isn't found but make reads this twice
   146 # since first time it isn't found but make reads this twice
   147 -include $(MAKE_CONFIG)
   147 -include $(MAKE_CONFIG)
   148 else
   148 else
   149 CONFIG_INCLUDED:=1
   149 CONFIG_INCLUDED:=1
       
   150 endif
       
   151 
       
   152 ifndef LIBPNG-CONFIG
       
   153 LIBPNG-CONFIG :=libpng-config
   150 endif
   154 endif
   151 
   155 
   152 # updates Makefile.config if it's outdated
   156 # updates Makefile.config if it's outdated
   153 ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
   157 ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
   154 	ifndef MANUAL_CONFIG	# manual config should not check this
   158 	ifndef MANUAL_CONFIG	# manual config should not check this
   459 endif
   463 endif
   460 
   464 
   461 # libpng config
   465 # libpng config
   462 ifdef WITH_PNG
   466 ifdef WITH_PNG
   463 CDEFS += -DWITH_PNG
   467 CDEFS += -DWITH_PNG
   464 CFLAGS += $(shell libpng-config --cflags)
   468 CFLAGS += $(shell $(LIBPNG-CONFIG) --cflags)
   465 
   469 
   466 # seems like older libpng versions are broken and need this
   470 # seems like older libpng versions are broken and need this
   467 PNGCONFIG_FLAGS = --ldflags --libs
   471 PNGCONFIG_FLAGS = --ldflags --libs
   468 ifdef STATIC
   472 ifdef STATIC
   469 ifdef OSX
   473 ifdef OSX
   470 # Seems like we need a tiny hack for OSX static to work
   474 # Seems like we need a tiny hack for OSX static to work
   471 LIBS += $(shell libpng-config --prefix)/lib/libpng.a
   475 LIBS += $(shell $(LIBPNG-CONFIG) --prefix)/lib/libpng.a
   472 else
   476 else
   473 LIBS += $(shell libpng-config --static $(PNGCONFIG_FLAGS))
   477 LIBS += $(shell $(LIBPNG-CONFIG) --static $(PNGCONFIG_FLAGS))
   474 endif
   478 endif
   475 else
   479 else
   476 LIBS += $(shell libpng-config  --L_opts $(PNGCONFIG_FLAGS))
   480 LIBS += $(shell $(LIBPNG-CONFIG)  --L_opts $(PNGCONFIG_FLAGS))
   477 endif
   481 endif
   478 endif
   482 endif
   479 
   483 
   480 # enables/disables assert()
   484 # enables/disables assert()
   481 ifdef DISABLE_ASSERTS
   485 ifdef DISABLE_ASSERTS