2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
4 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
6 # This code is released under the libpng license.
7 # For conditions of distribution and use, see the disclaimer
10 # Where the zlib library and include files are located
11 #ZLIBLIB=/usr/local/lib
12 #ZLIBINC=/usr/local/include
23 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
25 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
27 # Pre-built configuration
28 # See scripts/pnglibconf.mak for more options
29 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
31 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
32 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
33 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
36 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
40 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
41 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
47 pngtest: pngtest.o libpng.a
48 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
54 @echo "The $@ target is no longer supported by this makefile."
58 $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
60 # DO NOT DELETE THIS LINE -- make depend depends on it.
62 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
63 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
64 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
65 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
66 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
67 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
68 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
69 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
70 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
71 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
72 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
73 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
74 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
78 pngtest.o: png.h pngconf.h pnglibconf.h