103 lines · 3.5 KB · Text
RawDownload
# makefile for libpng# Copyright (C) 1998-2014 Glenn Randers-Pehrson# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.## This code is released under the libpng license.# For conditions of distribution and use, see the disclaimer# and license in png.h # where make install puts libpng.a and png.hprefix=/usr/localINCPATH=$(prefix)/includeLIBPATH=$(prefix)/lib # override DESTDIR= on the make install command line to easily support# installing into a temporary location.  Example:##    make install DESTDIR=/tmp/build/libpng## If you're going to install into a temporary location# via DESTDIR, $(DESTDIR)$(prefix) must already exist before# you execute make install.DESTDIR= CC=ccCPPFLAGS=-I../zlib -DSYSV -DmipsCFLAGS=-O -systype sysv -w#CFLAGS=-OLDFLAGS=-L. -L../zlib/ -lpng -lz -lm #RANLIB=ranlibRANLIB=echo CP=cp # Pre-built configuration# See scripts/pnglibconf.mak for more optionsPNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \	pngwtran.o pngmem.o pngerror.o pngpread.o .c.o:	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< all: libpng.a pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)	$(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS)	ar rc $@  $(OBJS)	$(RANLIB) $@ pngtest: pngtest.o libpng.a	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest	./pngtest install: libpng.a	-@mkdir $(DESTDIR)$(INCPATH)	-@mkdir $(DESTDIR)$(INCPATH)/libpng	-@mkdir $(DESTDIR)$(LIBPATH)	-@rm -f $(DESTDIR)$(INCPATH)/png.h	-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h	-@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h	cp png.h $(DESTDIR)$(INCPATH)/libpng	cp pngconf.h $(DESTDIR)$(INCPATH)/libpng	cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng	chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h	(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)	cp libpng.a $(DESTDIR)$(LIBPATH)	chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a clean:	rm -f *.o libpng.a pngtest pngout.png pnglibconf.h DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODOwritelock:	chmod a-w *.[ch35] $(DOCS) scripts/* # DO NOT DELETE THIS LINE -- make depend depends on it. png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.hpngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h pngtest.o: png.h pngconf.h pnglibconf.h