makefile.ibmc revision 5f6bd84e375226bf228fc8ac90318957ec9e1e7f
1# Makefile for libpng (static)
2# IBM C version 3.x for Win32 and OS/2
3# Copyright (C) 2006 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
24RM = del
25
26CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
27LDFLAGS =
28
29# File extensions
30O=.obj
31A=.lib
32E=.exe
33
34# Variables
35OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
36	pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
37	pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
38
39LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
40
41# Targets
42all: libpng$(A) pngtest$(E)
43
44libpng$(A): $(OBJS)
45	$(AR) -out:$@ $(OBJS)
46
47test: pngtest$(E)
48	pngtest$(E)
49
50pngtest: pngtest$(E)
51
52pngtest$(E): pngtest$(O) libpng$(A)
53	$(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
54
55clean:
56	$(RM) *$(O)
57	$(RM) libpng$(A)
58	$(RM) pngtest$(E)
59	$(RM) pngout.png
60
61png$(O):      png.h pngconf.h
62pngerror$(O): png.h pngconf.h
63pngget$(O):   png.h pngconf.h
64pngmem$(O):   png.h pngconf.h
65pngpread$(O): png.h pngconf.h
66pngread$(O):  png.h pngconf.h
67pngrio$(O):   png.h pngconf.h
68pngrtran$(O): png.h pngconf.h
69pngrutil$(O): png.h pngconf.h
70pngset$(O):   png.h pngconf.h
71pngtrans$(O): png.h pngconf.h
72pngwio$(O):   png.h pngconf.h
73pngwrite$(O): png.h pngconf.h
74pngwtran$(O): png.h pngconf.h
75pngwutil$(O): png.h pngconf.h
76
77pngtest$(O):  png.h pngconf.h
78