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, 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:
|
---|
11 | LIBNAME=libpng16
|
---|
12 | PNGMAJ=16
|
---|
13 |
|
---|
14 | # Shared library names:
|
---|
15 | LIBSO=$(LIBNAME).so
|
---|
16 | LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
---|
17 |
|
---|
18 | # Utilities:
|
---|
19 | CC=gcc
|
---|
20 | AR_RC=ar rc
|
---|
21 | RANLIB=echo
|
---|
22 | MKDIR_P=mkdir -p
|
---|
23 | LN_SF=ln -sf
|
---|
24 | CP=cp
|
---|
25 | RM_F=/bin/rm -f
|
---|
26 |
|
---|
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
|
---|
32 | ZLIBLIB=../zlib
|
---|
33 | ZLIBINC=../zlib
|
---|
34 |
|
---|
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.
|
---|
37 | ABI=
|
---|
38 |
|
---|
39 | WARNMORE=
|
---|
40 | CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
---|
41 | CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
|
---|
42 | LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
---|
43 | LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
---|
44 | -set_version sgi$(PNGMAJ).0
|
---|
45 | # See "man dso" for info about shared objects
|
---|
46 |
|
---|
47 | # Pre-built configuration
|
---|
48 | # See scripts/pnglibconf.mak for more options
|
---|
49 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
---|
50 |
|
---|
51 | OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
---|
52 | pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
---|
53 | pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
---|
54 |
|
---|
55 | .c.o:
|
---|
56 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
---|
57 |
|
---|
58 | all: libpng.a pngtest shared
|
---|
59 |
|
---|
60 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
---|
61 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
---|
62 |
|
---|
63 | libpng.a: $(OBJS)
|
---|
64 | $(AR_RC) $@ $(OBJS)
|
---|
65 | $(RANLIB) $@
|
---|
66 |
|
---|
67 | shared: $(LIBSOMAJ)
|
---|
68 |
|
---|
69 | $(LIBSO): $(LIBSOMAJ)
|
---|
70 | $(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
---|
71 |
|
---|
72 | $(LIBSOMAJ): $(OBJS)
|
---|
73 | $(LDSHARED) -o $@ $(OBJS)
|
---|
74 | $(RM_F) $(LIBSO) $(LIBSOMAJ)
|
---|
75 |
|
---|
76 | pngtest: pngtest.o libpng.a
|
---|
77 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
---|
78 |
|
---|
79 | test: pngtest
|
---|
80 | echo
|
---|
81 | echo Testing local static library.
|
---|
82 | ./pngtest
|
---|
83 |
|
---|
84 | install:
|
---|
85 | @echo "The $@ target is no longer supported by this makefile."
|
---|
86 | @false
|
---|
87 |
|
---|
88 | install-static:
|
---|
89 | @echo "The $@ target is no longer supported by this makefile."
|
---|
90 | @false
|
---|
91 |
|
---|
92 | install-shared:
|
---|
93 | @echo "The $@ target is no longer supported by this makefile."
|
---|
94 | @false
|
---|
95 |
|
---|
96 | clean:
|
---|
97 | $(RM_F) libpng.a pngtest pngout.png
|
---|
98 | $(RM_F) so_locations $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
|
---|
99 |
|
---|
100 | # DO NOT DELETE THIS LINE -- make depend depends on it.
|
---|
101 |
|
---|
102 | png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
103 | pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
104 | pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
105 | pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
106 | pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
107 | pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
108 | pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
109 | pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
110 | pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
111 | pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
112 | pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
113 | pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
114 | pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
115 | pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
116 | pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
117 |
|
---|
118 | pngtest.o: png.h pngconf.h pnglibconf.h
|
---|