1# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. 2# Copyright (C) 2020-2024 Cosmin Truta 3# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson 4# Copyright (C) 1995 Guy Eric Schalnat, Group 42 5# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard 6# 7# This code is released under the libpng license. 8# For conditions of distribution and use, see the disclaimer 9# and license in png.h 10 11# Where the zlib library and include files are located 12ZLIBLIB=/opt/zlib/lib 13ZLIBINC=/opt/zlib/include 14 15# Note that if you plan to build a libpng shared library, zlib must also 16# be a shared library, which zlib's configure does not do. After running 17# zlib's configure, edit the appropriate lines of makefile to read: 18# CPPFLAGS=-DHAVE_UNISTD -DUSE_MAP 19# CFLAGS=-O1 -fPIC 20# LDSHARED=ld -b 21# SHAREDLIB=libz.sl 22 23# Library name: 24LIBNAME=libpng16 25PNGMAJ=16 26 27# Shared library names: 28LIBSO=$(LIBNAME).sl 29LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) 30 31# Utilities: 32CC=cc 33AR=ar 34RANLIB=ranlib 35LN_SF=ln -sf 36RM_F=/bin/rm -f 37 38CPPFLAGS=-I$(ZLIBINC) 39CFLAGS=-O -Ae +DA1.1 +DS2.0 40# Caution: be sure you have built zlib with the same CFLAGS. 41CCFLAGS=-O -Ae +DA1.1 +DS2.0 42ARFLAGS=rc 43LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm 44 45# Pre-built configuration 46# See scripts/pnglibconf.mak for more options 47PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 48 49OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ 50 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ 51 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o 52 53OBJSDLL = $(OBJS:.o=.pic.o) 54 55.SUFFIXES: .c .o .pic.o 56 57.c.o: 58 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 59 60.c.pic.o: 61 $(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c 62 63all: libpng.a $(LIBSO) pngtest 64 65pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 66 $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 67 68libpng.a: $(OBJS) 69 $(AR) $(ARFLAGS) $@ $(OBJS) 70 $(RANLIB) $@ 71 72$(LIBSO): $(LIBSOMAJ) 73 $(LN_SF) $(LIBSOMAJ) $(LIBSO) 74 75$(LIBSOMAJ): $(OBJSDLL) 76 $(LD) -b +s \ 77 +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) 78 79pngtest: pngtest.o libpng.a 80 $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) 81 82test: pngtest 83 ./pngtest 84 85install: 86 @echo "The $@ target is no longer supported by this makefile." 87 @false 88 89install-static: 90 @echo "The $@ target is no longer supported by this makefile." 91 @false 92 93install-shared: 94 @echo "The $@ target is no longer supported by this makefile." 95 @false 96 97clean: 98 $(RM_F) *.o libpng.a pngtest pngout.png 99 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h 100 101# DO NOT DELETE THIS LINE -- make depend depends on it. 102 103png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 104pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 105pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 106pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 107pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 108pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 109pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 110pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 111pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 112pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 113pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 114pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 115pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 116pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 117pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 118 119pngtest.o: png.h pngconf.h pnglibconf.h 120