1 # makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
4 # Copyright (C) 2001, Laurent faillie
5 # Copyright (C) 1998, 1999 Greg Roelofs
6 # Copyright (C) 1996, 1997 Andreas Dilger
8 # This code is released under the libpng license.
9 # For conditions of distribution and use, see the disclaimer
10 # and license in png.h
16 # Shared library names:
18 LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
30 # Where the zlib library and include files are located
32 ZLIBINC=/opt/zlib/include
34 # Note that if you plan to build a libpng shared library, zlib must also
35 # be a shared library, which zlib's configure does not do. After running
36 # zlib's configure, edit the appropriate lines of makefile to read:
37 # CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
41 WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
42 -Wmissing-declarations -Wtraditional -Wcast-align \
43 -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
45 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
46 CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
47 #LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
48 LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
50 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
51 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
52 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
54 OBJSDLL = $(OBJS:.o=.pic.o)
56 .SUFFIXES: .c .o .pic.o
59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
62 $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
64 all: libpng.a $(LIBSO) pngtest
71 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
73 $(LIBSOMAJ): $(OBJSDLL)
75 +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL)
77 pngtest: pngtest.o $(LIBSO)
78 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
84 @echo "The $@ target is no longer supported by this makefile."
88 @echo "The $@ target is no longer supported by this makefile."
92 @echo "The $@ target is no longer supported by this makefile."
96 $(RM_F) *.o libpng.a pngtest pngout.png
97 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
99 # DO NOT DELETE THIS LINE -- make depend depends on it.
101 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
102 pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
103 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
104 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108 pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109 pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111 pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
113 pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114 pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115 pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117 pngtest.o: png.h pngconf.h pnglibconf.h