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