Merge branch 'upstream' into tizen
[platform/upstream/libpng.git] / scripts / makefile.dec
1 # makefile for libpng on DEC Alpha Unix
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2000-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=cc
20 AR_RC=ar rc
21 RANLIB=ranlib
22 MKDIR_P=mkdir
23 LN_SF=ln -f -s
24 CP=cp
25 RM_F=/bin/rm -f
26
27 # Where the zlib library and include files are located
28 #ZLIBLIB=/usr/local/lib
29 #ZLIBINC=/usr/local/include
30 ZLIBLIB=../zlib
31 ZLIBINC=../zlib
32
33 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
34 CFLAGS=-std -w1 -O # -g
35 LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
36
37 # Pre-built configuration
38 # See scripts/pnglibconf.mak for more options
39 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
40
41 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
42        pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
43        pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
44
45 .c.o:
46         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
47
48 all: $(LIBSO) libpng.a pngtest
49
50 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
51         $(CP) $(PNGLIBCONF_H_PREBUILT) $@
52
53 libpng.a: $(OBJS)
54         $(AR_RC) $@ $(OBJS)
55         $(RANLIB) $@
56
57 $(LIBSO): $(LIBSOMAJ)
58         $(LN_SF) $(LIBSOMAJ) $(LIBSO)
59
60 $(LIBSOMAJ): $(OBJS)
61         $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -soname $(LIBSOMAJ)
62
63 pngtest: pngtest.o libpng.a
64         $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
65
66 test: pngtest
67         ./pngtest
68
69 install:
70         @echo "The $@ target is no longer supported by this makefile."
71         @false
72
73 install-static:
74         @echo "The $@ target is no longer supported by this makefile."
75         @false
76
77 install-shared:
78         @echo "The $@ target is no longer supported by this makefile."
79         @false
80
81 clean:
82         $(RM_F) *.o libpng.a pngtest pngout.png
83         $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
84
85 # DO NOT DELETE THIS LINE -- make depend depends on it.
86
87 png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
88 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
89 pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
90 pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
91 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
92 pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
93 pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
94 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
95 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
96 pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
97 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
98 pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
99 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
100 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
101 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
102
103 pngtest.o:  png.h pngconf.h pnglibconf.h