1# makefile for libpng 2# Copyright (C) 2020-2024 Cosmin Truta 3# Copyright (C) 1998-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 10CC=cc 11AR=ar 12#RANLIB=ranlib 13RANLIB=echo 14CPPFLAGS=-I../zlib -DSYSV -Dmips 15CFLAGS=-O -systype sysv -w 16#CFLAGS=-O 17ARFLAGS=rc 18LDFLAGS=-L. -L../zlib/ -lpng -lz -lm 19 20# Pre-built configuration 21# See scripts/pnglibconf.mak for more options 22PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 23 24OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ 25 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ 26 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o 27 28.c.o: 29 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 30 31all: libpng.a pngtest 32 33pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 34 cp $(PNGLIBCONF_H_PREBUILT) $@ 35 36libpng.a: $(OBJS) 37 $(AR) $(ARFLAGS) $@ $(OBJS) 38 $(RANLIB) $@ 39 40pngtest: pngtest.o libpng.a 41 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) 42 43test: pngtest 44 ./pngtest 45 46install: 47 @echo "The $@ target is no longer supported by this makefile." 48 @false 49 50clean: 51 rm -f *.o libpng.a pngtest pngout.png pnglibconf.h 52 53# DO NOT DELETE THIS LINE -- make depend depends on it. 54 55png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 56pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 57pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 58pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 59pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 60pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 61pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 62pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 63pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 64pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 65pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 66pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 67pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 68pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 69pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 70 71pngtest.o: png.h pngconf.h pnglibconf.h 72