2 # Copyright (C) Glenn Randers-Pehrson
3 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
5 # This code is released under the libpng license.
6 # For conditions of distribution and use, see the disclaimer
9 # where make install puts libpng.a and png.h
11 INCPATH=$(prefix)/include
14 # override DESTDIR= on the make install command line to easily support
15 # installing into a temporary location. Example:
17 # make install DESTDIR=/tmp/build/libpng
19 # If you're going to install into a temporary location
20 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
21 # you execute make install.
25 CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
27 LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
32 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
33 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
34 pngwtran.o pngmem.o pngerror.o pngpread.o
42 pngtest: pngtest.o libpng.a
43 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
49 -@mkdir $(DESTDIR)$(INCPATH)
50 -@mkdir $(DESTDIR)$(INCPATH)/libpng
51 -@mkdir $(DESTDIR)$(LIBPATH)
52 -@rm -f $(DESTDIR)$(INCPATH)/png.h
53 -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
54 cp png.h $(DESTDIR)$(INCPATH)/libpng
55 cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
56 chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
57 chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
58 (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
59 cp libpng.a $(DESTDIR)$(LIBPATH)
60 chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
63 rm -f *.o libpng.a pngtest pngout.png
65 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
67 chmod a-w *.[ch35] $(DOCS) scripts/*
69 # DO NOT DELETE THIS LINE -- make depend depends on it.
71 png.o: png.h pngconf.h
72 pngerror.o: png.h pngconf.h
73 pngrio.o: png.h pngconf.h
74 pngwio.o: png.h pngconf.h
75 pngmem.o: png.h pngconf.h
76 pngset.o: png.h pngconf.h
77 pngget.o: png.h pngconf.h
78 pngread.o: png.h pngconf.h
79 pngpread.o: png.h pngconf.h
80 pngrtran.o: png.h pngconf.h
81 pngrutil.o: png.h pngconf.h
82 pngtrans.o: png.h pngconf.h
83 pngwrite.o: png.h pngconf.h
84 pngwtran.o: png.h pngconf.h
85 pngwutil.o: png.h pngconf.h
87 pngtest.o: png.h pngconf.h