]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.bor
No changes, just minor wxMSW code cleanup: use WinStruct<>.
[wxWidgets.git] / src / png / scripts / makefile.bor
CommitLineData
0272a10d
VZ
1# Makefile for libpng
2# 16-bit Borland C++ (Note: All modules are compiled in C mode)
3# To build the library, do:
4# "make -fmakefile.bor -DMODEL=c"
5# or: "make -fmakefile.bor -DMODEL=l"
6#
7# ------------ Borland C++ ------------
8
9### Absolutely necessary for this makefile to work
10.AUTODEPEND
11
12## Where zlib.h, zconf.h and zlib_MODEL.lib are
13ZLIB_DIR=..\zlib
14
0272a10d
VZ
15## Compiler, linker and lib stuff
16CC=bcc
17LD=bcc
18LIB=tlib
19
20!ifndef MODEL
21MODEL=l
22!endif
23
24MODEL_ARG=-m$(MODEL)
25
26#TARGET_CPU=3
27# 2 = 286, 3 = 386, etc.
28!ifndef TARGET_CPU
29TARGET_CPU=2
30!endif
31
32# Use this if you don't want Borland's fancy exception handling
33# (for Borland C++ 4.0 or later)
34#NOEHLIB=noeh$(MODEL).lib
35
36!ifdef DEBUG
37CDEBUG=-v
38LDEBUG=-v
39!else
40CDEBUG=
41LDEBUG=
42!endif
43
44# STACKOFLOW=1
45!ifdef STACKOFLOW
46CDEBUG=$(CDEBUG) -N
47LDEBUG=$(LDEBUG) -N
48!endif
49
50# -X- turn on dependency generation in the object file
51# -w set all warnings on
52# -O2 optimize for speed
53# -Z global optimization
54CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
55
56# -M generate map file
57LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
58
0272a10d 59## Variables
b61cc19c 60
0272a10d
VZ
61OBJS = \
62 png.obj \
63 pngerror.obj \
64 pngget.obj \
65 pngmem.obj \
66 pngpread.obj \
67 pngread.obj \
68 pngrio.obj \
69 pngrtran.obj \
70 pngrutil.obj \
71 pngset.obj \
72 pngtrans.obj \
73 pngwio.obj \
74 pngwrite.obj \
75 pngwtran.obj \
76 pngwutil.obj
77
78LIBOBJS = \
79 +png.obj \
80 +pngerror.obj \
81 +pngget.obj \
82 +pngmem.obj \
83 +pngpread.obj \
84 +pngread.obj \
85 +pngrio.obj \
86 +pngrtran.obj \
87 +pngrutil.obj \
88 +pngset.obj \
89 +pngtrans.obj \
90 +pngwio.obj \
91 +pngwrite.obj \
92 +pngwtran.obj \
93 +pngwutil.obj
94
95LIBNAME=libpng$(MODEL).lib
96
0272a10d 97## Implicit rules
b61cc19c 98
0272a10d
VZ
99# Braces let make "batch" calls to the compiler,
100# 2 calls instead of 12; space is important.
101.c.obj:
102 $(CC) $(CFLAGS) -c {$*.c }
103
104.c.exe:
105 $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
106
0272a10d 107## Major targets
b61cc19c 108
0272a10d
VZ
109all: libpng pngtest
110
9c0d9ce3
DS
111# try !inlude scripts\pnglibconf.mak for more options
112pnglibconf.h: scripts\pnglibconf.h.prebuilt
113 copy scripts\pnglibconf.h.prebuilt $@
114
0272a10d
VZ
115libpng: $(LIBNAME)
116
117pngtest: pngtest$(MODEL).exe
118
119test: pngtest$(MODEL).exe
120 pngtest$(MODEL)
121
0272a10d
VZ
122## Minor Targets
123
9c0d9ce3
DS
124png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
125pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
126pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
127pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
128pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
129pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
130pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
131pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
132pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
133pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
134pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
135pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
136pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
137pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
138pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
0272a10d
VZ
139
140$(LIBNAME): $(OBJS)
141 -del $(LIBNAME)
142 $(LIB) $(LIBNAME) @&&|
143$(LIBOBJS), libpng$(MODEL)
144|
145
9c0d9ce3 146pngtest$(MODEL).obj: pngtest.c png.h pngconf.h pnglibconf.h
0272a10d
VZ
147 $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
148
149pngtest$(MODEL).exe: pngtest$(MODEL).obj
150 $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
151
0272a10d
VZ
152# Clean up anything else you want
153clean:
9c0d9ce3 154 -del pnglibconf.h
0272a10d
VZ
155 -del *.obj
156 -del *.exe
157 -del *.lib
158 -del *.lst
159 -del *.map
160
0272a10d 161# End of makefile for libpng