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