1 # makefile for libpng using gcc (generic, static library)
2 # Copyright (C) 2002 Glenn Randers-Pehrson
3 # Copyright (C) 2000 Cosmin Truta
4 # Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
5 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
6 # For conditions of distribution and use, see copyright notice in png.h
8 # Location of the zlib library and include files
12 # Compiler, linker, lib and other tools
21 PNGVER = $(PNGMAJ).$(PNGMIN)
24 INCPATH=$(prefix)/include
27 # override DESTDIR= on the make install command line to easily support
28 # installing into a temporary location. Example:
30 # make install DESTDIR=/tmp/build/libpng
32 # If you're going to install into a temporary location
33 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
34 # you execute make install.
37 DI=$(DESTDIR)/$(INCPATH)
38 DL=$(DESTDIR)/$(LIBPATH)
40 CDEBUG = -g -DPNG_DEBUG=5
44 CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
45 LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
53 OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
54 pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
55 pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
58 all: libpng$(A) pngtest$(E)
67 pngtest$(E): pngtest$(O) libpng$(A)
68 $(LD) -o $@ pngtest$(O) $(LDFLAGS)
71 -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
72 -@if [ ! -d $(DI)/libpng ]; then mkdir $(DI)/libpng; fi
73 -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
76 cp png.h pngconf.h $(DI)/libpng
77 chmod 644 $(DI)/libpng/png.h \
78 $(DI)/libpng/pngconf.h
79 (cd $(DI); ln -f -s libpng/* .)
83 /bin/rm -f *.o libpng.a pngtest pngout.png
85 png$(O): png.h pngconf.h
86 pngerror$(O): png.h pngconf.h
87 pngget$(O): png.h pngconf.h
88 pngmem$(O): png.h pngconf.h
89 pngpread$(O): png.h pngconf.h
90 pngread$(O): png.h pngconf.h
91 pngrio$(O): png.h pngconf.h
92 pngrtran$(O): png.h pngconf.h
93 pngrutil$(O): png.h pngconf.h
94 pngset$(O): png.h pngconf.h
95 pngtest$(O): png.h pngconf.h
96 pngtrans$(O): png.h pngconf.h
97 pngwio$(O): png.h pngconf.h
98 pngwrite$(O): png.h pngconf.h
99 pngwtran$(O): png.h pngconf.h
100 pngwutil$(O): png.h pngconf.h