1*a67afe4dSAndroid Build Coastguard Worker# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. 2*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2020-2024 Cosmin Truta 3*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson 4*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2001, Laurent faillie 5*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 1998, 1999 Greg Roelofs 6*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 1996, 1997 Andreas Dilger 7*a67afe4dSAndroid Build Coastguard Worker# 8*a67afe4dSAndroid Build Coastguard Worker# This code is released under the libpng license. 9*a67afe4dSAndroid Build Coastguard Worker# For conditions of distribution and use, see the disclaimer 10*a67afe4dSAndroid Build Coastguard Worker# and license in png.h 11*a67afe4dSAndroid Build Coastguard Worker 12*a67afe4dSAndroid Build Coastguard Worker# Library name: 13*a67afe4dSAndroid Build Coastguard WorkerLIBNAME=libpng16 14*a67afe4dSAndroid Build Coastguard WorkerPNGMAJ=16 15*a67afe4dSAndroid Build Coastguard Worker 16*a67afe4dSAndroid Build Coastguard Worker# Shared library names: 17*a67afe4dSAndroid Build Coastguard WorkerLIBSO=$(LIBNAME).sl 18*a67afe4dSAndroid Build Coastguard WorkerLIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) 19*a67afe4dSAndroid Build Coastguard Worker 20*a67afe4dSAndroid Build Coastguard Worker# Utilities: 21*a67afe4dSAndroid Build Coastguard WorkerCC=gcc 22*a67afe4dSAndroid Build Coastguard WorkerAR=ar 23*a67afe4dSAndroid Build Coastguard WorkerRANLIB=ranlib 24*a67afe4dSAndroid Build Coastguard WorkerLD=ld 25*a67afe4dSAndroid Build Coastguard WorkerLN_SF=ln -sf 26*a67afe4dSAndroid Build Coastguard WorkerCP=cp 27*a67afe4dSAndroid Build Coastguard WorkerRM_F=/bin/rm -f 28*a67afe4dSAndroid Build Coastguard Worker 29*a67afe4dSAndroid Build Coastguard Worker# Where the zlib library and include files are located 30*a67afe4dSAndroid Build Coastguard WorkerZLIBLIB=/opt/zlib/lib 31*a67afe4dSAndroid Build Coastguard WorkerZLIBINC=/opt/zlib/include 32*a67afe4dSAndroid Build Coastguard Worker 33*a67afe4dSAndroid Build Coastguard Worker# Note that if you plan to build a libpng shared library, zlib must also 34*a67afe4dSAndroid Build Coastguard Worker# be a shared library, which zlib's configure does not do. After running 35*a67afe4dSAndroid Build Coastguard Worker# zlib's configure, edit the appropriate lines of makefile to read: 36*a67afe4dSAndroid Build Coastguard Worker# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ 37*a67afe4dSAndroid Build Coastguard Worker# LDSHARED=ld -b 38*a67afe4dSAndroid Build Coastguard Worker# SHAREDLIB=libz.sl 39*a67afe4dSAndroid Build Coastguard Worker 40*a67afe4dSAndroid Build Coastguard WorkerWARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ 41*a67afe4dSAndroid Build Coastguard Worker -Wmissing-declarations -Wtraditional -Wcast-align \ 42*a67afe4dSAndroid Build Coastguard Worker -Wstrict-prototypes -Wmissing-prototypes # -Wconversion 43*a67afe4dSAndroid Build Coastguard Worker 44*a67afe4dSAndroid Build Coastguard WorkerCPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 45*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g 46*a67afe4dSAndroid Build Coastguard WorkerARFLAGS=rc 47*a67afe4dSAndroid Build Coastguard Worker#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g 48*a67afe4dSAndroid Build Coastguard WorkerLDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g 49*a67afe4dSAndroid Build Coastguard Worker 50*a67afe4dSAndroid Build Coastguard WorkerOBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ 51*a67afe4dSAndroid Build Coastguard Worker pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ 52*a67afe4dSAndroid Build Coastguard Worker pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o 53*a67afe4dSAndroid Build Coastguard Worker 54*a67afe4dSAndroid Build Coastguard WorkerOBJSDLL = $(OBJS:.o=.pic.o) 55*a67afe4dSAndroid Build Coastguard Worker 56*a67afe4dSAndroid Build Coastguard Worker.SUFFIXES: .c .o .pic.o 57*a67afe4dSAndroid Build Coastguard Worker 58*a67afe4dSAndroid Build Coastguard Worker.c.o: 59*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 60*a67afe4dSAndroid Build Coastguard Worker 61*a67afe4dSAndroid Build Coastguard Worker.c.pic.o: 62*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c 63*a67afe4dSAndroid Build Coastguard Worker 64*a67afe4dSAndroid Build Coastguard Workerall: libpng.a $(LIBSO) pngtest 65*a67afe4dSAndroid Build Coastguard Worker 66*a67afe4dSAndroid Build Coastguard Workerlibpng.a: $(OBJS) 67*a67afe4dSAndroid Build Coastguard Worker $(AR) $(ARFLAGS) $@ $(OBJS) 68*a67afe4dSAndroid Build Coastguard Worker $(RANLIB) $@ 69*a67afe4dSAndroid Build Coastguard Worker 70*a67afe4dSAndroid Build Coastguard Worker$(LIBSO): $(LIBSOMAJ) 71*a67afe4dSAndroid Build Coastguard Worker $(LN_SF) $(LIBSOMAJ) $(LIBSO) 72*a67afe4dSAndroid Build Coastguard Worker 73*a67afe4dSAndroid Build Coastguard Worker$(LIBSOMAJ): $(OBJSDLL) 74*a67afe4dSAndroid Build Coastguard Worker $(LD) -b +s \ 75*a67afe4dSAndroid Build Coastguard Worker +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) 76*a67afe4dSAndroid Build Coastguard Worker 77*a67afe4dSAndroid Build Coastguard Workerpngtest: pngtest.o $(LIBSO) 78*a67afe4dSAndroid Build Coastguard Worker $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) 79*a67afe4dSAndroid Build Coastguard Worker 80*a67afe4dSAndroid Build Coastguard Workertest: pngtest 81*a67afe4dSAndroid Build Coastguard Worker ./pngtest 82*a67afe4dSAndroid Build Coastguard Worker 83*a67afe4dSAndroid Build Coastguard Workerinstall: 84*a67afe4dSAndroid Build Coastguard Worker @echo "The $@ target is no longer supported by this makefile." 85*a67afe4dSAndroid Build Coastguard Worker @false 86*a67afe4dSAndroid Build Coastguard Worker 87*a67afe4dSAndroid Build Coastguard Workerinstall-static: 88*a67afe4dSAndroid Build Coastguard Worker @echo "The $@ target is no longer supported by this makefile." 89*a67afe4dSAndroid Build Coastguard Worker @false 90*a67afe4dSAndroid Build Coastguard Worker 91*a67afe4dSAndroid Build Coastguard Workerinstall-shared: 92*a67afe4dSAndroid Build Coastguard Worker @echo "The $@ target is no longer supported by this makefile." 93*a67afe4dSAndroid Build Coastguard Worker @false 94*a67afe4dSAndroid Build Coastguard Worker 95*a67afe4dSAndroid Build Coastguard Workerclean: 96*a67afe4dSAndroid Build Coastguard Worker $(RM_F) *.o libpng.a pngtest pngout.png 97*a67afe4dSAndroid Build Coastguard Worker $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h 98*a67afe4dSAndroid Build Coastguard Worker 99*a67afe4dSAndroid Build Coastguard Worker# DO NOT DELETE THIS LINE -- make depend depends on it. 100*a67afe4dSAndroid Build Coastguard Worker 101*a67afe4dSAndroid Build Coastguard Workerpng.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 102*a67afe4dSAndroid Build Coastguard Workerpngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 103*a67afe4dSAndroid Build Coastguard Workerpngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 104*a67afe4dSAndroid Build Coastguard Workerpngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 105*a67afe4dSAndroid Build Coastguard Workerpngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 106*a67afe4dSAndroid Build Coastguard Workerpngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 107*a67afe4dSAndroid Build Coastguard Workerpngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 108*a67afe4dSAndroid Build Coastguard Workerpngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 109*a67afe4dSAndroid Build Coastguard Workerpngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 110*a67afe4dSAndroid Build Coastguard Workerpngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 111*a67afe4dSAndroid Build Coastguard Workerpngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 112*a67afe4dSAndroid Build Coastguard Workerpngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 113*a67afe4dSAndroid Build Coastguard Workerpngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 114*a67afe4dSAndroid Build Coastguard Workerpngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 115*a67afe4dSAndroid Build Coastguard Workerpngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 116*a67afe4dSAndroid Build Coastguard Worker 117*a67afe4dSAndroid Build Coastguard Workerpngtest.o: png.h pngconf.h pnglibconf.h 118