1 # makefile for libpng using gcc (generic, static library)
2 # Copyright (C) 2000, 2022 Cosmin Truta
3 # Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
4 # Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
5 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
7 # This code is released under the libpng license.
8 # For conditions of distribution and use, see the disclaimer
11 # Location of the zlib library and include files
15 # Compiler, linker, lib and other tools
27 CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
28 CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
29 LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
32 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
33 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
34 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
38 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
40 all: $(LIBNAME).a pngtest
42 include scripts/pnglibconf.mak
44 DFNFLAGS = $(DEFS) $(CPPFLAGS)
53 pngtest: pngtest.o $(LIBNAME).a
54 $(LD) -o $@ pngtest.o $(LDFLAGS)
57 @echo "The $@ target is no longer supported by this makefile."
61 $(RM_F) *.o $(LIBNAME).a pngtest pngout.png pnglibconf.h
63 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
64 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
65 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
66 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
67 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
68 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
69 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
70 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
71 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
72 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
73 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
74 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
77 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
79 pngtest.o: png.h pngconf.h pnglibconf.h