| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 | # Makefile for PngMinus (rpng2)# Linux / Unix#CC=ccCC=gccLD=$(CC)# If awk fails try# make AWK=nawk# If cpp fails try# make CPP=/lib/cppRM=rm -fCOPY=cp#XINC = -I/usr/include			# old-style, stock X distributions#XLIB = -L/usr/lib/X11 -lX11		#  (including SGI IRIX)#XINC = -I/usr/openwin/include		# Sun workstations (OpenWindows)#XLIB = -L/usr/openwin/lib -lX11XINC = -I/usr/X11R6/include		# new X distributions (X.org, etc.)XLIB = -L/usr/X11R6/lib -lX11#XLIB = -L/usr/X11R6/lib64 -lX11	# e.g., Red Hat on AMD64#XINC = -I/usr/local/include   		# FreeBSD#XLIB = -L/usr/local/lib -lX11#LIBS = $(XLIB)LIBS = $(XLIB) -lm                      #platforms that need libmCPPFLAGS=-I. $(XINC) -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIPCFLAGS=-O1 -WallC=.cO=.oL=.aE=# Where to find the source code:PNGSRC =../../..ZLIBSRC=$(PNGSRC)/../zlibPROGSRC=$(PNGSRC)/contrib/gregbook# Zlib (minimal inflate requirements - crc32 is used by libpng)# zutil can be eliminated if you provide your own zcalloc and zcfreeZSRCS  = adler32$(C) crc32$(C) \	 inffast$(C) inflate$(C) inftrees$(C) \	 zutil$(C)# Standard headersZH     = zlib.h crc32.h inffast.h inffixed.h \	 inflate.h inftrees.h zutil.h# Machine generated headersZCONF  = zconf.h# Headers callers useZINC   = zlib.h $(ZCONF)# Headers the Zlib source usesZHDRS  = $(ZH) $(ZCONF)ZOBJS  = adler32$(O) crc32$(O) \	 inffast$(O) inflate$(O) inftrees$(O) \	 zutil$(O)# libpngPNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \	pngpread$(C) pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \	pngset$(C) pngtrans$(C)# Standard headersPNGH   =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h# Machine generated headersPNGCONF=pnglibconf.h# Headers callers usePNGINC= png.h pngconf.h pngusr.h $(PNGCONF)# Headers the PNG library usesPNGHDRS=$(PNGH) $(PNGCONF) pngusr.hPNGOBJS=png$(O) pngerror$(O) pngget$(O) pngmem$(O) \	pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \	pngset$(O) pngtrans$(O)PROGSRCS= rpng2-x$(C) readpng2$(C)PROGHDRS= readpng2.hPROGDOCS= COPYING LICENSEPROGOBJS= rpng2-x$(O) readpng2$(O)OBJS    = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)# implicit make rules -------------------------------------------------------.c$(O):	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<# dependenciesall: $(PROGDOCS) rpng2-x$(E)rpng2-x$(E): $(OBJS)	$(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)# The DFA_XTRA setting turns all libpng options off then# turns on those required for this minimal build.# The CPP_FLAGS setting causes pngusr.h to be included in# both the build of pnglibconf.h and, subsequently, when# building libpng itself.$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak $(ZH)\	$(PNGSRC)/scripts/pnglibconf.dfa \	$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa	$(RM) pnglibconf.h pnglibconf.dfn	$(MAKE) -f $(PNGSRC)/scripts/pnglibconf.mak $(MAKEFLAGS)\	    srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG -I."\	    DFA_XTRA="pngusr.dfa" $@clean:	$(MAKE) -f $(PNGSRC)/scripts/pnglibconf.mak $(MAKEFLAGS)\	    srcdir=$(PNGSRC) clean	$(RM) rpng2-x$(O)	$(RM) rpng2-x$(E)	$(RM) $(OBJS)# distclean also removes the copied source and headersdistclean: clean	$(RM) -r scripts # historical reasons	$(RM) $(PNGSRCS) $(PNGH)	$(RM) $(ZSRCS) $(ZH) $(ZCONF)	$(RM) $(PROGSRCS) $(PROGHDRS) $(PROGDOCS)# Header file dependencies:$(PROGOBJS): $(PROGHDRS) $(PNGINC) $(ZINC)$(PNGOBJS): $(PNGHDRS) $(ZINC)$(ZOBJS): $(ZHDRS)# Gather the source code from the respective directories$(PNGSRCS) $(PNGH): $(PNGSRC)/$@	$(RM) $@	$(COPY) $(PNGSRC)/$@ $@# No dependency on the ZLIBSRC target so that it only needs# to be specified once.$(ZSRCS) $(ZH):	$(RM) $@	$(COPY) $(ZLIBSRC)/$@ $@# The unconfigured zconf.h varies in name according to the# zlib release$(ZCONF):	$(RM) $@	@for f in zconf.h.in zconf.in.h zconf.h; do\	    test -r $(ZLIBSRC)/$$f &&\	    echo $(COPY) $(ZLIBSRC)/$$f $@ &&\	    $(COPY) $(ZLIBSRC)/$$f $@ && exit 0;\	done; echo copy: $(ZLIBSRC)/zconf.h not found; exit 1$(PROGSRCS) $(PROGHDRS) $(PROGDOCS): $(PROGSRC)/$@	$(RM) $@	$(COPY) $(PROGSRC)/$@ $@# End of makefile for rpng2-x
 |