xref: /aosp_15_r20/external/libpng/scripts/makefile.ibmc (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard Worker# Makefile for libpng (static)
2*a67afe4dSAndroid Build Coastguard Worker# IBM C version 3.x for Win32 and OS/2
3*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
4*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2000, 2020 Cosmin Truta
5*a67afe4dSAndroid Build Coastguard Worker#
6*a67afe4dSAndroid Build Coastguard Worker# This code is released under the libpng license.
7*a67afe4dSAndroid Build Coastguard Worker# For conditions of distribution and use, see the disclaimer
8*a67afe4dSAndroid Build Coastguard Worker# and license in png.h
9*a67afe4dSAndroid Build Coastguard Worker#
10*a67afe4dSAndroid Build Coastguard Worker# Notes:
11*a67afe4dSAndroid Build Coastguard Worker#   Derived from makefile.std
12*a67afe4dSAndroid Build Coastguard Worker#   All modules are compiled in C mode
13*a67afe4dSAndroid Build Coastguard Worker#   Tested under Win32, expected to work under OS/2
14*a67afe4dSAndroid Build Coastguard Worker#   Can be easily adapted for IBM VisualAge/C++ for AIX
15*a67afe4dSAndroid Build Coastguard Worker
16*a67afe4dSAndroid Build Coastguard Worker# Location of the zlib library and include files
17*a67afe4dSAndroid Build Coastguard WorkerZLIBINC = ../zlib
18*a67afe4dSAndroid Build Coastguard WorkerZLIBLIB = ../zlib
19*a67afe4dSAndroid Build Coastguard Worker
20*a67afe4dSAndroid Build Coastguard Worker# Compiler, linker, lib and other tools
21*a67afe4dSAndroid Build Coastguard WorkerCC = icc
22*a67afe4dSAndroid Build Coastguard WorkerLD = ilink
23*a67afe4dSAndroid Build Coastguard WorkerAR = ilib
24*a67afe4dSAndroid Build Coastguard WorkerCP = copy
25*a67afe4dSAndroid Build Coastguard WorkerRM = del
26*a67afe4dSAndroid Build Coastguard Worker
27*a67afe4dSAndroid Build Coastguard WorkerCPPFLAGS = -I$(ZLIBINC)
28*a67afe4dSAndroid Build Coastguard WorkerCFLAGS = -Mc -O2 -W3
29*a67afe4dSAndroid Build Coastguard WorkerLDFLAGS =
30*a67afe4dSAndroid Build Coastguard Worker
31*a67afe4dSAndroid Build Coastguard Worker# Pre-built configuration
32*a67afe4dSAndroid Build Coastguard Worker# See scripts/pnglibconf.mak for more options
33*a67afe4dSAndroid Build Coastguard WorkerPNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
34*a67afe4dSAndroid Build Coastguard Worker
35*a67afe4dSAndroid Build Coastguard Worker# File extensions
36*a67afe4dSAndroid Build Coastguard WorkerO=.obj
37*a67afe4dSAndroid Build Coastguard WorkerA=.lib
38*a67afe4dSAndroid Build Coastguard WorkerE=.exe
39*a67afe4dSAndroid Build Coastguard Worker
40*a67afe4dSAndroid Build Coastguard Worker# File lists
41*a67afe4dSAndroid Build Coastguard WorkerOBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
42*a67afe4dSAndroid Build Coastguard Worker       pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
43*a67afe4dSAndroid Build Coastguard Worker       pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
44*a67afe4dSAndroid Build Coastguard Worker
45*a67afe4dSAndroid Build Coastguard WorkerLIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
46*a67afe4dSAndroid Build Coastguard Worker
47*a67afe4dSAndroid Build Coastguard Worker# Targets
48*a67afe4dSAndroid Build Coastguard Worker.c$(O):
49*a67afe4dSAndroid Build Coastguard Worker	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
50*a67afe4dSAndroid Build Coastguard Worker
51*a67afe4dSAndroid Build Coastguard Workerall: libpng$(A) pngtest$(E)
52*a67afe4dSAndroid Build Coastguard Worker
53*a67afe4dSAndroid Build Coastguard Workerpnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
54*a67afe4dSAndroid Build Coastguard Worker	$(CP) $(PNGLIBCONF_H_PREBUILT) $@
55*a67afe4dSAndroid Build Coastguard Worker
56*a67afe4dSAndroid Build Coastguard Workerlibpng$(A): $(OBJS)
57*a67afe4dSAndroid Build Coastguard Worker	$(AR) -out:$@ $(OBJS)
58*a67afe4dSAndroid Build Coastguard Worker
59*a67afe4dSAndroid Build Coastguard Workertest: pngtest$(E)
60*a67afe4dSAndroid Build Coastguard Worker	pngtest$(E)
61*a67afe4dSAndroid Build Coastguard Worker
62*a67afe4dSAndroid Build Coastguard Workerpngtest: pngtest$(E)
63*a67afe4dSAndroid Build Coastguard Worker
64*a67afe4dSAndroid Build Coastguard Workerpngtest$(E): pngtest$(O) libpng$(A)
65*a67afe4dSAndroid Build Coastguard Worker	$(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
66*a67afe4dSAndroid Build Coastguard Worker
67*a67afe4dSAndroid Build Coastguard Workerclean:
68*a67afe4dSAndroid Build Coastguard Worker	-$(RM) *$(O)
69*a67afe4dSAndroid Build Coastguard Worker	-$(RM) libpng$(A)
70*a67afe4dSAndroid Build Coastguard Worker	-$(RM) pnglibconf.h
71*a67afe4dSAndroid Build Coastguard Worker	-$(RM) pngtest$(E)
72*a67afe4dSAndroid Build Coastguard Worker	-$(RM) pngout.png
73*a67afe4dSAndroid Build Coastguard Worker
74*a67afe4dSAndroid Build Coastguard Workerpng$(O):      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75*a67afe4dSAndroid Build Coastguard Workerpngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76*a67afe4dSAndroid Build Coastguard Workerpngget$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
77*a67afe4dSAndroid Build Coastguard Workerpngmem$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
78*a67afe4dSAndroid Build Coastguard Workerpngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
79*a67afe4dSAndroid Build Coastguard Workerpngread$(O):  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
80*a67afe4dSAndroid Build Coastguard Workerpngrio$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
81*a67afe4dSAndroid Build Coastguard Workerpngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
82*a67afe4dSAndroid Build Coastguard Workerpngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
83*a67afe4dSAndroid Build Coastguard Workerpngset$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
84*a67afe4dSAndroid Build Coastguard Workerpngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
85*a67afe4dSAndroid Build Coastguard Workerpngwio$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
86*a67afe4dSAndroid Build Coastguard Workerpngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
87*a67afe4dSAndroid Build Coastguard Workerpngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
88*a67afe4dSAndroid Build Coastguard Workerpngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
89*a67afe4dSAndroid Build Coastguard Worker
90*a67afe4dSAndroid Build Coastguard Workerpngtest$(O):  png.h pngconf.h pnglibconf.h
91