1# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc' 2# Copyright (C) 2020-2024 Cosmin Truta 3# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson 4# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 5# 6# This code is released under the libpng license. 7# For conditions of distribution and use, see the disclaimer 8# and license in png.h 9 10# Library name: 11LIBNAME=libpng16 12PNGMAJ=16 13 14# Shared library names: 15LIBSO=$(LIBNAME).so 16LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) 17 18# Utilities: 19CC=cc 20AR=ar 21RANLIB=echo 22LN_SF=ln -sf 23CP=cp 24RM_F=/bin/rm -f 25 26# Where the zlib library and include files are located 27#ZLIBLIB=/usr/local/lib32 28#ZLIBINC=/usr/local/include 29#ZLIBLIB=/usr/local/lib 30#ZLIBINC=/usr/local/include 31ZLIBLIB=../zlib 32ZLIBINC=../zlib 33 34# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 35# See "man abi". zlib must be built with the same ABI. 36ABI= 37 38WARNMORE=-fullwarn 39# Note: -KPIC is the default anyhow 40CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 41#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g 42CFLAGS=$(ABI) -O $(WARNMORE) # -g 43ARFLAGS=rc 44LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g 45LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g 46LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ 47 -set_version sgi$(PNGMAJ).0 48# See "man dso" for info about shared objects 49 50# Pre-built configuration 51# See scripts/pnglibconf.mak for more options 52PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 53 54OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ 55 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ 56 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o 57 58.c.o: 59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 60 61all: libpng.a pngtest shared 62 63pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 64 $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 65 66libpng.a: $(OBJS) 67 $(AR) $(ARFLAGS) $@ $(OBJS) 68 $(RANLIB) $@ 69 70$(LIBSO): $(LIBSOMAJ) 71 $(LN_SF) $(LIBSOMAJ) $(LIBSO) 72 73$(LIBSOMAJ): $(OBJS) 74 $(LDSHARED) -o $@ $(OBJS) 75 $(RM_F) $(LIBSO) $(LIBSOMAJ) 76 77pngtest: pngtest.o libpng.a 78 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) 79 80test: pngtest 81 echo 82 echo Testing local static library. 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)* so_locations 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