blob: 861a5515712e1cfdb433c8fcd1ac35d8dc44699e [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
24RM = del
25
Sireesh Tripurarib478e662014-05-09 15:15:10 +053026CPPFLAGS = -I$(ZLIBINC)
27CFLAGS = -Mc -O2 -W3
The Android Open Source Project893912b2009-03-03 19:30:05 -080028LDFLAGS =
29
30# File extensions
31O=.obj
32A=.lib
33E=.exe
34
35# Variables
36OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
37 pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
38 pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
39
40LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
41
42# Targets
Sireesh Tripurarib478e662014-05-09 15:15:10 +053043.c$(O):
44 $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
45
The Android Open Source Project893912b2009-03-03 19:30:05 -080046all: libpng$(A) pngtest$(E)
47
Chris Craikb50c2172013-07-29 15:28:30 -070048# see scripts/pnglibconf.mak for more options
49pnglibconf.h: scripts/pnglibconf.h.prebuilt
50 cp scripts/pnglibconf.h.prebuilt $@
51
The Android Open Source Project893912b2009-03-03 19:30:05 -080052libpng$(A): $(OBJS)
53 $(AR) -out:$@ $(OBJS)
54
55test: pngtest$(E)
56 pngtest$(E)
57
58pngtest: pngtest$(E)
59
60pngtest$(E): pngtest$(O) libpng$(A)
61 $(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
62
63clean:
64 $(RM) *$(O)
65 $(RM) libpng$(A)
Chris Craikb50c2172013-07-29 15:28:30 -070066 $(RM) pnglibconf.h
The Android Open Source Project893912b2009-03-03 19:30:05 -080067 $(RM) pngtest$(E)
68 $(RM) pngout.png
69
Sireesh Tripurarib478e662014-05-09 15:15:10 +053070png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
71pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
72pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
73pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
74pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
77pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
78pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
79pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
80pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
81pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
82pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
83pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
84pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
Patrick Scotta0bb96c2009-07-22 11:50:02 -040085
Chris Craikb50c2172013-07-29 15:28:30 -070086pngtest$(O): png.h pngconf.h pnglibconf.h