]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.bor
going back to 16x16 standard size
[wxWidgets.git] / src / png / scripts / makefile.bor
CommitLineData
c801d85f 1# Makefile for libpng
9dfaa473
GD
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"
c801d85f
KB
5# or: "make -fmakefile.bor -DMODEL=l"
6#
9dfaa473 7# ------------ Borland C++ ------------
c801d85f
KB
8
9### Absolutely necessary for this makefile to work
10.AUTODEPEND
11
9dfaa473
GD
12## Where zlib.h, zconf.h and zlib_MODEL.lib are
13ZLIB_DIR=..\zlib
c801d85f 14
c801d85f 15
9dfaa473
GD
16## Compiler, linker and lib stuff
17CC=bcc
18LD=bcc
19LIB=tlib
c801d85f
KB
20
21!ifndef MODEL
22MODEL=l
23!endif
24
9dfaa473
GD
25MODEL_ARG=-m$(MODEL)
26
c801d85f
KB
27#TARGET_CPU=3
28# 2 = 286, 3 = 386, etc.
29!ifndef TARGET_CPU
30TARGET_CPU=2
31!endif
32
9dfaa473
GD
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
c801d85f
KB
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
9dfaa473
GD
51# -X- turn on dependency generation in the object file
52# -w set all warnings on
c801d85f
KB
53# -O2 optimize for speed
54# -Z global optimization
9dfaa473 55CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
c801d85f
KB
56
57# -M generate map file
9dfaa473 58LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
c801d85f 59
c801d85f 60
9dfaa473 61## Variables
c801d85f 62OBJS = \
9dfaa473
GD
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
c801d85f
KB
78
79LIBOBJS = \
9dfaa473
GD
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
c801d85f
KB
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:
9dfaa473 106 $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
c801d85f
KB
107
108
109## Major targets
9dfaa473
GD
110all: libpng pngtest
111
c801d85f
KB
112libpng: $(LIBNAME)
113
114pngtest: pngtest$(MODEL).exe
115
9dfaa473 116test: pngtest$(MODEL).exe
c801d85f
KB
117 pngtest$(MODEL)
118
119
120## Minor Targets
121
122png.obj: png.c
9dfaa473 123pngerror.obj: pngerror.c
c801d85f 124pngget.obj: pngget.c
9dfaa473 125pngmem.obj: pngmem.c
c801d85f 126pngpread.obj: pngpread.c
9dfaa473
GD
127pngread.obj: pngread.c
128pngrio.obj: pngrio.c
c801d85f
KB
129pngrtran.obj: pngrtran.c
130pngrutil.obj: pngrutil.c
9dfaa473 131pngset.obj: pngset.c
c801d85f 132pngtrans.obj: pngtrans.c
9dfaa473 133pngwio.obj: pngwio.c
c801d85f
KB
134pngwrite.obj: pngwrite.c
135pngwtran.obj: pngwtran.c
136pngwutil.obj: pngwutil.c
137
138
139$(LIBNAME): $(OBJS)
140 -del $(LIBNAME)
9dfaa473 141 $(LIB) $(LIBNAME) @&&|
c801d85f
KB
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
9dfaa473 150 $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
c801d85f
KB
151
152
153# Clean up anything else you want
154clean:
155 -del *.obj
9dfaa473 156 -del *.exe
c801d85f
KB
157 -del *.lib
158 -del *.lst
9dfaa473 159 -del *.map
c801d85f
KB
160
161
162# End of makefile for libpng