]> git.tdb.fi Git - ext/libpng.git/blob - scripts/makefile.sunos
Import libpng 1.6.39
[ext/libpng.git] / scripts / makefile.sunos
1 # makefile for libpng
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2002, 2006, 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 # Where the zlib library and include files are located
11 #ZLIBLIB=/usr/local/lib
12 #ZLIBINC=/usr/local/include
13 ZLIBLIB=../zlib
14 ZLIBINC=../zlib
15
16 CC=gcc
17 AR_RC=ar rc
18 RANLIB=ranlib
19 MKDIR_P=mkdir -p
20 CP=cp
21 RM_F=/bin/rm -f
22
23 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
24 CFLAGS=-O
25 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
26
27 # Pre-built configuration
28 # See scripts/pnglibconf.mak for more options
29 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
30
31 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
32        pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
33        pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
34
35 .c.o:
36         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
37
38 all: libpng.a pngtest
39
40 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
41         $(CP) $(PNGLIBCONF_H_PREBUILT) $@
42
43 libpng.a: $(OBJS)
44         $(AR_RC) $@ $(OBJS)
45         $(RANLIB) $@
46
47 pngtest: pngtest.o libpng.a
48         $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
49
50 test: pngtest
51         ./pngtest
52
53 install:
54         @echo "The $@ target is no longer supported by this makefile."
55         @false
56
57 clean:
58         $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
59
60 # DO NOT DELETE THIS LINE -- make depend depends on it.
61
62 png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
63 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
64 pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
65 pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
66 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
67 pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
68 pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
69 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
70 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
71 pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
72 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
73 pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
74 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
77
78 pngtest.o:  png.h pngconf.h pnglibconf.h