]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libpng/lib/dist/scripts/makefile.watcom
update
[l4.git] / l4 / pkg / libpng / lib / dist / scripts / makefile.watcom
1 # Makefile for libpng
2 # Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model
3
4 # Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
5 # copyright 1995 Guy Eric Schalnat, Group 42, Inc.
6 #
7 # This code is released under the libpng license.
8 # For conditions of distribution and use, see the disclaimer
9 # and license in png.h
10
11 # To use, do "wmake /f scripts\makefile.watcom"
12
13
14 # ---------------------- Watcom C/C++ 10.0 and later -----------------------
15
16 # Where the zlib library and include files are located
17 ZLIBLIB=..\zlib
18 ZLIBINC=..\zlib
19
20 # Target OS
21 OS=DOS
22 #OS=NT
23
24 # Target CPU
25 CPU=6           # Pentium Pro
26 #CPU=5          # Pentium
27
28 # Calling convention
29 CALLING=r       # registers
30 #CALLING=s      # stack
31
32 # Uncomment next to put error messages in a file
33 #ERRFILE=>>pngerrs
34
35 # --------------------------------------------------------------------------
36
37
38 CC=wcc386
39 CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
40 LD=wcl386
41 LDFLAGS=-zq
42
43 O=.obj
44
45 OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
46 OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
47 OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
48
49
50 all: test
51
52 # see scripts/pnglibconf.mak for more options
53 # to support watcom calling conventions it is necessary to set PNG_API_RULE to 2
54 # in pnglibconf.h - copy scripts/pnglibconf.h.prebuilt, delete the first line and change
55 # the definition of PNG_API_RULE from 0 to 2.
56 #
57 # If you know how to do this with the Watcom build system please supply a patch
58 # for this makefile to the PNG implementation list.
59 pnglibconf.h: scripts/pnglibconf.h.prebuilt
60         @echo please copy scripts/pnglibconf.h.prebuilt and change PNG_API_RULE to 2
61
62 png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
63         $(CC) $(CFLAGS) $*.c $(ERRFILE)
64
65 pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
66         $(CC) $(CFLAGS) $*.c $(ERRFILE)
67
68 pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
69         $(CC) $(CFLAGS) $*.c $(ERRFILE)
70
71 pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
72         $(CC) $(CFLAGS) $*.c $(ERRFILE)
73
74 pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75         $(CC) $(CFLAGS) $*.c $(ERRFILE)
76
77 pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
78         $(CC) $(CFLAGS) $*.c $(ERRFILE)
79
80 pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
81         $(CC) $(CFLAGS) $*.c $(ERRFILE)
82
83 pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
84         $(CC) $(CFLAGS) $*.c $(ERRFILE)
85
86 pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
87         $(CC) $(CFLAGS) $*.c $(ERRFILE)
88
89 pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
90         $(CC) $(CFLAGS) $*.c $(ERRFILE)
91
92 pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
93         $(CC) $(CFLAGS) $*.c $(ERRFILE)
94
95 pngtest$(O): png.h pngconf.h pnglibconf.h
96         $(CC) $(CFLAGS) $*.c $(ERRFILE)
97
98 pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
99         $(CC) $(CFLAGS) $*.c $(ERRFILE)
100
101 pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
102         $(CC) $(CFLAGS) $*.c $(ERRFILE)
103
104 pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105         $(CC) $(CFLAGS) $*.c $(ERRFILE)
106
107 pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108         $(CC) $(CFLAGS) $*.c $(ERRFILE)
109
110 libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
111         wlib -b -c -n -q libpng.lib $(OBJS1)
112         wlib -b -c -q libpng.lib $(OBJS2)
113         wlib -b -c -q libpng.lib $(OBJS3)
114
115 pngtest.exe: pngtest.obj libpng.lib
116         $(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
117
118 test: pngtest.exe .symbolic
119         pngtest.exe
120
121
122 # End of makefile for libpng