2 # Copyright (C) 2002 Glenn Randers-Pehrson
3 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
4 # For conditions of distribution and use, see copyright notice in png.h
5 # modified for LC56/ATARI assumes libz.lib is in same dir and uses default
6 # rules for library management
12 # where make install puts libpng.a and png.h
14 INCPATH=$(prefix)/include
17 # override DESTDIR= on the make install command line to easily support
18 # installing into a temporary location. Example:
20 # make install DESTDIR=/tmp/build/libpng
22 # If you're going to install into a temporary location
23 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
24 # you execute make install.
27 OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
28 $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
29 $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
30 $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
31 $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
33 all: $(LBR) pngtest.ttp
37 pngtest.ttp: pngtest.o $(LBR)
38 $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
41 -@mkdir $(DESTDIR)$(INCPATH)
42 -@mkdir $(DESTDIR)$(INCPATH)/libpng
43 -@mkdir $(DESTDIR)$(LIBPATH)
44 -@rm -f $(DESTDIR)$(INCPATH)/png.h
45 -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
46 cp png.h $(DESTDIR)$(INCPATH)/libpng
47 cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
48 chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
49 chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
50 (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
51 ln -f -s $(LIBNAME)/* .)