1 # makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
4 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
6 # This code is released under the libpng license.
7 # For conditions of distribution and use, see the disclaimer
14 # Shared library names:
16 LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
27 # Where the zlib library and include files are located
28 #ZLIBLIB=/usr/local/lib32
29 #ZLIBINC=/usr/local/include
30 #ZLIBLIB=/usr/local/lib
31 #ZLIBINC=/usr/local/include
35 # ABI can be blank to use default for your system, -32, -o32, -n32, or -64
36 # See "man abi". zlib must be built with the same ABI.
40 # Note: -KPIC is the default anyhow
41 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
42 #CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
43 CFLAGS=$(ABI) -O $(WARNMORE) # -g
44 LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
45 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
46 LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
47 -set_version sgi$(PNGMAJ).0
48 # See "man dso" for info about shared objects
50 # Pre-built configuration
51 # See scripts/pnglibconf.mak for more options
52 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
54 OBJS = 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
59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
61 all: libpng.a pngtest shared
63 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
64 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
71 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
74 $(LDSHARED) -o $@ $(OBJS)
75 $(RM_F) $(LIBSO) $(LIBSOMAJ)
77 pngtest: pngtest.o libpng.a
78 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
82 echo Testing local static library.
86 @echo "The $@ target is no longer supported by this makefile."
90 @echo "The $@ target is no longer supported by this makefile."
94 @echo "The $@ target is no longer supported by this makefile."
98 $(RM_F) *.o libpng.a pngtest pngout.png
99 $(RM_F) $(LIBSO) $(LIBSOMAJ)* so_locations pnglibconf.h
101 # DO NOT DELETE THIS LINE -- make depend depends on it.
103 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
104 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
113 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
116 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
119 pngtest.o: png.h pngconf.h pnglibconf.h