xref: /aosp_15_r20/external/libpng/scripts/makefile.dec (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1# makefile for libpng on DEC Alpha Unix
2# Copyright (C) 2020-2024 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:
11LIBNAME=libpng16
12PNGMAJ=16
13
14# Shared library names:
15LIBSO=$(LIBNAME).so
16LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
17
18# Utilities:
19CC=cc
20AR=ar
21RANLIB=ranlib
22LN_SF=ln -f -s
23CP=cp
24RM_F=/bin/rm -f
25
26# Where the zlib library and include files are located
27#ZLIBLIB=/usr/local/lib
28#ZLIBINC=/usr/local/include
29ZLIBLIB=../zlib
30ZLIBINC=../zlib
31
32CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
33CFLAGS=-std -w1 -O # -g
34ARFLAGS=rc
35LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
36
37# Pre-built configuration
38# See scripts/pnglibconf.mak for more options
39PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
40
41OBJS = 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
48all: $(LIBSO) libpng.a pngtest
49
50pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
51	$(CP) $(PNGLIBCONF_H_PREBUILT) $@
52
53libpng.a: $(OBJS)
54	$(AR) $(ARFLAGS) $@ $(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
63pngtest: pngtest.o libpng.a
64	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
65
66test: pngtest
67	./pngtest
68
69install:
70	@echo "The $@ target is no longer supported by this makefile."
71	@false
72
73install-static:
74	@echo "The $@ target is no longer supported by this makefile."
75	@false
76
77install-shared:
78	@echo "The $@ target is no longer supported by this makefile."
79	@false
80
81clean:
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
87png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
88pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
89pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
90pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
91pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
92pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
93pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
94pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
95pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
96pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
97pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
98pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
99pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
100pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
101pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
102
103pngtest.o:  png.h pngconf.h pnglibconf.h
104