blob: 89b11966b0df3e23326d309d317f7108880d93f1 [file] [log] [blame]
The Android Open Source Project893912b2009-03-03 19:30:05 -08001# Makefile for libpng (static)
2# IBM C version 3.x for Win32 and OS/2
Sireesh Tripurarib478e662014-05-09 15:15:10 +05303# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
The Android Open Source Project893912b2009-03-03 19:30:05 -08004# Copyright (C) 2000 Cosmin Truta
Patrick Scott5f6bd842010-06-28 16:55:16 -04005#
Patrick Scotta0bb96c2009-07-22 11:50:02 -04006# This code is released under the libpng license.
7# For conditions of distribution and use, see the disclaimer
8# and license in png.h
Patrick Scott5f6bd842010-06-28 16:55:16 -04009#
The Android Open Source Project893912b2009-03-03 19:30:05 -080010# Notes:
11# Derived from makefile.std
12# All modules are compiled in C mode
13# Tested under Win32, expected to work under OS/2
14# Can be easily adapted for IBM VisualAge/C++ for AIX
15
16# Location of the zlib library and include files
17ZLIBINC = ../zlib
18ZLIBLIB = ../zlib
19
20# Compiler, linker, lib and other tools
21CC = icc
22LD = ilink
23AR = ilib
Matt Sarett9ea75692016-01-08 13:00:42 -050024CP = copy
The Android Open Source Project893912b2009-03-03 19:30:05 -080025RM = del
26
Sireesh Tripurarib478e662014-05-09 15:15:10 +053027CPPFLAGS = -I$(ZLIBINC)
28CFLAGS = -Mc -O2 -W3
The Android Open Source Project893912b2009-03-03 19:30:05 -080029LDFLAGS =
30
Matt Sarett9ea75692016-01-08 13:00:42 -050031# Pre-built configuration
32# See scripts/pnglibconf.mak for more options
33PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
34
The Android Open Source Project893912b2009-03-03 19:30:05 -080035# File extensions
36O=.obj
37A=.lib
38E=.exe
39
40# Variables
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
45LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
46
47# Targets
Sireesh Tripurarib478e662014-05-09 15:15:10 +053048.c$(O):
49 $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
50
The Android Open Source Project893912b2009-03-03 19:30:05 -080051all: libpng$(A) pngtest$(E)
52
Matt Sarett9ea75692016-01-08 13:00:42 -050053pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
54 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
Chris Craikb50c2172013-07-29 15:28:30 -070055
The Android Open Source Project893912b2009-03-03 19:30:05 -080056libpng$(A): $(OBJS)
57 $(AR) -out:$@ $(OBJS)
58
59test: pngtest$(E)
60 pngtest$(E)
61
62pngtest: pngtest$(E)
63
64pngtest$(E): pngtest$(O) libpng$(A)
65 $(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
66
67clean:
68 $(RM) *$(O)
69 $(RM) libpng$(A)
Chris Craikb50c2172013-07-29 15:28:30 -070070 $(RM) pnglibconf.h
The Android Open Source Project893912b2009-03-03 19:30:05 -080071 $(RM) pngtest$(E)
72 $(RM) pngout.png
73
Sireesh Tripurarib478e662014-05-09 15:15:10 +053074png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
77pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
78pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
79pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
80pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
81pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
82pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
83pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
84pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
85pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
86pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
87pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
88pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
Patrick Scotta0bb96c2009-07-22 11:50:02 -040089
Chris Craikb50c2172013-07-29 15:28:30 -070090pngtest$(O): png.h pngconf.h pnglibconf.h