]> git.saurik.com Git - wxWidgets.git/blob - src/png/scripts/makefile.bor
warning fix
[wxWidgets.git] / src / png / scripts / makefile.bor
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
18 BCROOT=N:\BC45
19 !endif
20
21 # Where zlib.h and zconf.h and zlib.lib are
22 ZLIB_PATH=..\zlib
23
24 !ifndef MODEL
25 MODEL=l
26 !endif
27
28 #TARGET_CPU=3
29 # 2 = 286, 3 = 386, etc.
30 !ifndef TARGET_CPU
31 TARGET_CPU=2
32 !endif
33
34
35 # Use this if you don't want Borland's fancy exception handling.
36 NOEHLIB=noeh$(MODEL).lib
37
38 !ifdef DEBUG
39 CDEBUG=-v
40 LDEBUG=-v
41 !else
42 CDEBUG=
43 LDEBUG=
44 !endif
45
46 # STACKOFLOW=1
47 !ifdef STACKOFLOW
48 CDEBUG=$(CDEBUG) -N
49 LDEBUG=$(LDEBUG) -N
50 !endif
51
52
53 ## Compiler, linker, and lib stuff
54 CC=bcc
55 LD=bcc
56 LIB=tlib
57
58 MODELARG=-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
64 CFLAGS=-O2 -Z -X- -w -I$(ZLIB_PATH) -$(TARGET_CPU) $(MODELARG) $(CDEBUG)
65
66 # -M generate map file
67 LDFLAGS=-M $(LDEBUG)
68
69 O=obj
70
71 ## variables
72 OBJS = \
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
89 LIBOBJS = \
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
106 LIBNAME=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
120 libpng: $(LIBNAME)
121
122 pngtest: pngtest$(MODEL).exe
123
124 test:
125 pngtest$(MODEL)
126
127
128 ## Minor Targets
129
130 png.obj: png.c
131 pngset.obj: pngset.c
132 pngget.obj: pngget.c
133 pngread.obj: pngread.c
134 pngpread.obj: pngpread.c
135 pngrtran.obj: pngrtran.c
136 pngrutil.obj: pngrutil.c
137 pngerror.obj: pngerror.c
138 pngmem.obj: pngmem.c
139 pngrio.obj: pngrio.c
140 pngwio.obj: pngwio.c
141 pngtrans.obj: pngtrans.c
142 pngwrite.obj: pngwrite.c
143 pngwtran.obj: pngwtran.c
144 pngwutil.obj: pngwutil.c
145
146
147 $(LIBNAME): $(OBJS)
148 -del $(LIBNAME)
149 $(LIB) $(LIBNAME) @&&|
150 $(LIBOBJS), libpng$(MODEL)
151 |
152
153
154 pngtest$(MODEL).obj: pngtest.c
155 $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
156
157 pngtest$(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
162 clean:
163 -del *.obj
164 -del *.lib
165 -del *.lst
166
167
168 # End of makefile for libpng