# HG changeset patch # User Matti Hamalainen # Date 1351922063 -7200 # Node ID f18f07d8a731167c8d7e5fd3e18d4ee03ea11e8e # Parent 8d15443ce20901766df2ae1312912948827f2cfc Fix building with libpng. diff -r 8d15443ce209 -r f18f07d8a731 Makefile --- a/Makefile Sat Nov 03 07:54:13 2012 +0200 +++ b/Makefile Sat Nov 03 07:54:23 2012 +0200 @@ -7,8 +7,8 @@ TREMOR_CFLAGS=-I/usr/local/lib/ TREMOR_LDFLAGS=/usr/local/lib/libvorbisidec.a /usr/lib/i386-linux-gnu/libogg.a -LIBPNG_CFLAGS=`pkg-config --cflags libpng` -DHAVE_LIBPNG -LIBPNG_CFLAGS=`pkg-config --libs libpng` +LIBPNG_CFLAGS=`pkg-config --cflags libpng` +LIBPNG_LDFLAGS=`pkg-config --libs libpng` RANLIB=ranlib diff -r 8d15443ce209 -r f18f07d8a731 Makefile.gen --- a/Makefile.gen Sat Nov 03 07:54:13 2012 +0200 +++ b/Makefile.gen Sat Nov 03 07:54:23 2012 +0200 @@ -218,6 +218,10 @@ endif +ifeq ($(DM_USE_LIBPNG),yes) +DM_CFLAGS += -DDM_USE_LIBPNG $(LIBPNG_CFLAGS) +endif + ### ### Rest of the rules ### @@ -380,7 +384,7 @@ $(BINPATH)gfxconv$(EXEEXT): $(OBJPATH)gfxconv.o $(DMLIB_A) @echo " LINK $+" - @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(LIBPNG_CFLAGS) $(LIBPNG_LDFLAGS) + @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(LIBPNG_LDFLAGS) $(BINPATH)view64$(EXEEXT): $(OBJPATH)view64.o $(DMLIB_A) @echo " LINK $+" diff -r 8d15443ce209 -r f18f07d8a731 config.mak.in --- a/config.mak.in Sat Nov 03 07:54:13 2012 +0200 +++ b/config.mak.in Sat Nov 03 07:54:23 2012 +0200 @@ -3,6 +3,11 @@ DM_BUILD_TESTS=yes DM_BUILD_TOOLS=yes +# Use libpng? Required for PNG read/write support in some tools. +# NOTICE!!!! _NOT_ required for simple PNG read support via dmimage, +# that is implemented via modified stb_image.c's PNG loader. +DM_USE_LIBPNG=yes + # Build Qt based demo editor? DM_BUILD_EDITOR=yes