diff -ru optipng-0.5.4.orig/lib/pngxtern/scripts/gcc.mak optipng-0.5.4/lib/pngxtern/scripts/gcc.mak --- optipng-0.5.4.orig/lib/pngxtern/scripts/gcc.mak 2006-05-10 21:15:00.000000000 +0200 +++ optipng-0.5.4/lib/pngxtern/scripts/gcc.mak 2006-09-14 22:17:47.528801620 +0200 @@ -17,7 +17,9 @@ CDEBUG = -g LDDEBUG = CRELEASE = -O2 -LDRELEASE = -s + +# remove -s from LDRELEASE to prevent stripping +LDRELEASE = CFLAGS = -Wall $(CRELEASE) LDFLAGS = $(LDRELEASE) LIBS = -lpng -lz -lm @@ -37,7 +39,7 @@ all: pngxtern$(A) .c$(O): - $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) $< + $(CC) -c $(CFLAGS) $< pngxtern$(A): $(OBJS) $(AR_RC) $@ $(OBJS) diff -ru optipng-0.5.4.orig/src/scripts/gcc.mak optipng-0.5.4/src/scripts/gcc.mak --- optipng-0.5.4.orig/src/scripts/gcc.mak 2006-07-15 16:25:00.000000000 +0200 +++ optipng-0.5.4/src/scripts/gcc.mak 2006-09-14 22:17:06.910263120 +0200 @@ -13,30 +13,27 @@ CC = gcc LD = $(CC) CFLAGS = -O2 -Wall -LDFLAGS = -s +# remove -s from LDFLAGS to prevent stripping +LDFLAGS = OPTIPNG = optipng$(EXE) ZLIB = libz.a PNGLIB = libpng.a PNGXLIB = pngxtern.a -ZMAK = Makefile -PNGMAK = scripts/makefile.gcc PNGXMAK = scripts/gcc.mak -ZDIR = ../lib/zlib -PNGDIR = ../lib/libpng PNGXDIR = ../lib/pngxtern BACKHERE = ../../src OBJS = optipng.o opngio.o opngreduc.o cbitset.o osys.o strutil.o -LIBS = $(PNGXDIR)/$(PNGXLIB) $(PNGDIR)/$(PNGLIB) $(ZDIR)/$(ZLIB) +LIBS = $(PNGXDIR)/$(PNGXLIB) $(OPTIPNG): $(OBJS) $(LIBS) - $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) + $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) -lpng -lz .c.o: - $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR) $*.c + $(CC) -c $(CFLAGS) -I$(PNGXDIR) $*.c optipng.o : optipng.c proginfo.h opng.h cexcept.h cbitset.h osys.h strutil.h opngio.o : opngio.c opng.h @@ -46,35 +43,23 @@ strutil.o : strutil.c strutil.h -$(PNGXDIR)/$(PNGXLIB): $(ZDIR)/$(ZLIB) $(PNGDIR)/$(PNGLIB) +$(PNGXDIR)/$(PNGXLIB): cd $(PNGXDIR); \ $(MAKE) -f $(PNGXMAK) $(PNGXLIB); \ cd $(BACKHERE) -$(PNGDIR)/$(PNGLIB): $(ZDIR)/$(ZLIB) - cd $(PNGDIR); \ - $(MAKE) -f $(PNGMAK) $(PNGLIB); \ - cd $(BACKHERE) - -$(ZDIR)/$(ZLIB): - cd $(ZDIR); \ - ./configure; \ - $(MAKE) -f $(ZMAK) $(ZLIB); \ - cd $(BACKHERE) - - install: $(OPTIPNG) - -@if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi - -@if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi - -@rm -f ${bindir}/$(OPTIPNG) - -@rm -f ${man1dir}/optipng.1 - cp -p $(OPTIPNG) ${bindir} - cp -p ../man/optipng.1 ${man1dir} + -@if [ ! -d ${DESTDIR}/${bindir} ]; then mkdir -p ${DESTDIR}/${bindir}; fi + -@if [ ! -d ${DESTDIR}/${man1dir} ]; then mkdir -p ${DESTDIR}/${man1dir}; fi + -@rm -f ${DESTDIR}/${bindir}/$(OPTIPNG) + -@rm -f ${DESTDIR}/${man1dir}/optipng.1 + cp -p $(OPTIPNG) ${DESTDIR}/${bindir} + cp -p ../man/optipng.1 ${DESTDIR}/${man1dir} uninstall: - rm -f ${bindir}/$(OPTIPNG) - rm -f ${man1dir}/optipng.1 + rm -f ${DESTDIR}/${bindir}/$(OPTIPNG) + rm -f ${DESTDIR}/${man1dir}/optipng.1 clean: @@ -82,9 +67,3 @@ cd $(PNGXDIR); \ $(MAKE) -f $(PNGXMAK) clean; \ cd $(BACKHERE) - cd $(PNGDIR); \ - $(MAKE) -f $(PNGMAK) clean; \ - cd $(BACKHERE) - cd $(ZDIR); \ - $(MAKE) -f $(ZMAK) clean; \ - cd $(BACKHERE)