src/third-party/libpng/scripts/makefile.ibmc (view raw)
1# Makefile for libpng (static)
2# IBM C version 3.x for Win32 and OS/2
3# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
4# Copyright (C) 2000 Cosmin Truta
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# 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
24CP = copy
25RM = del
26
27CPPFLAGS = -I$(ZLIBINC)
28CFLAGS = -Mc -O2 -W3
29LDFLAGS =
30
31# Pre-built configuration
32# See scripts/pnglibconf.mak for more options
33PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
34
35# 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
48.c$(O):
49 $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
50
51all: libpng$(A) pngtest$(E)
52
53pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
54 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
55
56libpng$(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)
70 $(RM) pnglibconf.h
71 $(RM) pngtest$(E)
72 $(RM) pngout.png
73
74png$(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
89
90pngtest$(O): png.h pngconf.h pnglibconf.h