2 # Copyright (C) 2002, 2014 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 # Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
10 # rules for library management
15 LDFLAGS = -L. -L..\zlib -lpng -lz -lm
17 # where make install puts libpng.a and png.h
19 INCPATH=$(prefix)/include
22 # override DESTDIR= on the make install command line to easily support
23 # installing into a temporary location. Example:
25 # make install DESTDIR=/tmp/build/libpng
27 # If you're going to install into a temporary location
28 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
29 # you execute make install.
32 # Pre-built configuration
33 # See scripts/pnglibconf.mak for more options
34 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
36 OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
37 $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
38 $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
39 $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
40 $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
42 all: $(LBR) pngtest.ttp
45 $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
49 $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
51 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
52 cp $(PNGLIBCONF_H_PREBUILT) $@
54 pngtest.ttp: pngtest.o $(LBR)
55 $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
58 -@mkdir $(DESTDIR)$(INCPATH)
59 -@mkdir $(DESTDIR)$(INCPATH)/libpng
60 -@mkdir $(DESTDIR)$(LIBPATH)
61 -@rm -f $(DESTDIR)$(INCPATH)/png.h
62 -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
63 -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
64 cp png.h $(DESTDIR)$(INCPATH)/libpng
65 cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
66 cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
67 chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
68 chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
69 chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
70 (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
71 ln -f -s $(LIBNAME)/* .)