2 # Copyright (C) 2002, 2006 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.
24 # Where the zlib library and include files are located
25 #ZLIBLIB=/usr/local/lib
26 #ZLIBINC=/usr/local/include
37 CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
38 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
40 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
41 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
42 pngwtran.o pngmem.o pngerror.o pngpread.o
50 pngtest: pngtest.o libpng.a
51 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
57 -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
58 -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
59 -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
60 -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
61 -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
62 cp png.h $(DESTDIR)$(INCPATH)/libpng
63 cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
64 chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
65 chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
66 (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
67 cp libpng.a $(DESTDIR)$(LIBPATH)
68 chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
71 $(RM_F) *.o libpng.a pngtest pngout.png
73 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
75 chmod a-w *.[ch35] $(DOCS) scripts/*
77 # DO NOT DELETE THIS LINE -- make depend depends on it.
79 png.o: png.h pngconf.h pngpriv.h
80 pngerror.o: png.h pngconf.h pngpriv.h
81 pngrio.o: png.h pngconf.h pngpriv.h
82 pngwio.o: png.h pngconf.h pngpriv.h
83 pngmem.o: png.h pngconf.h pngpriv.h
84 pngset.o: png.h pngconf.h pngpriv.h
85 pngget.o: png.h pngconf.h pngpriv.h
86 pngread.o: png.h pngconf.h pngpriv.h
87 pngrtran.o: png.h pngconf.h pngpriv.h
88 pngrutil.o: png.h pngconf.h pngpriv.h
89 pngtrans.o: png.h pngconf.h pngpriv.h
90 pngwrite.o: png.h pngconf.h pngpriv.h
91 pngwtran.o: png.h pngconf.h pngpriv.h
92 pngwutil.o: png.h pngconf.h pngpriv.h
93 pngpread.o: png.h pngconf.h pngpriv.h
95 pngtest.o: png.h pngconf.h