]> git.saurik.com Git - wxWidgets.git/blob - tests/makefile.gcc
Avoid doing a str(object) since in some cases it can result in very
[wxWidgets.git] / tests / makefile.gcc
1 # =========================================================================
2 # This makefile was generated by
3 # Bakefile 0.1.6 (http://bakefile.sourceforge.net)
4 # Do not modify, all changes will be overwritten!
5 # =========================================================================
6
7 include ../build/msw/config.gcc
8
9 # -------------------------------------------------------------------------
10 # Do not modify the rest of this file!
11 # -------------------------------------------------------------------------
12
13 ### Variables: ###
14
15 WX_RELEASE_NODOT = 25
16 OBJS = \
17 gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
18 LIBDIRNAME = .\..\lib\gcc_$(LIBTYPE_SUFFIX)$(CFG)
19 SETUPHDIR = \
20 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
21 TEST_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) -DHAVE_W32API_H \
22 -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) \
23 -I.\..\include -I$(SETUPHDIR) -W -Wall -I. $(__DLLFLAG_p) -DwxUSE_GUI=0 \
24 $(CPPUNIT_CFLAGS) $(__EXCEPTIONSFLAG) $(__EXCEPTIONSFLAG_0) \
25 -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
26 TEST_OBJECTS = \
27 $(OBJS)\test_dummy.o \
28 $(OBJS)\test_test.o \
29 $(OBJS)\test_archivetest.o \
30 $(OBJS)\test_ziptest.o \
31 $(OBJS)\test_arrays.o \
32 $(OBJS)\test_datetimetest.o \
33 $(OBJS)\test_fileconftest.o \
34 $(OBJS)\test_filekind.o \
35 $(OBJS)\test_filenametest.o \
36 $(OBJS)\test_filesystest.o \
37 $(OBJS)\test_fontmaptest.o \
38 $(OBJS)\test_formatconvertertest.o \
39 $(OBJS)\test_hashes.o \
40 $(OBJS)\test_lists.o \
41 $(OBJS)\test_longlongtest.o \
42 $(OBJS)\test_mbconvtest.o \
43 $(OBJS)\test_regextest.o \
44 $(OBJS)\test_wxregextest.o \
45 $(OBJS)\test_strings.o \
46 $(OBJS)\test_stdstrings.o \
47 $(OBJS)\test_unicode.o \
48 $(OBJS)\test_crt.o \
49 $(OBJS)\test_bstream.o \
50 $(OBJS)\test_datastreamtest.o \
51 $(OBJS)\test_ffilestream.o \
52 $(OBJS)\test_filestream.o \
53 $(OBJS)\test_largefile.o \
54 $(OBJS)\test_memstream.o \
55 $(OBJS)\test_sstream.o \
56 $(OBJS)\test_textstreamtest.o \
57 $(OBJS)\test_zlibstream.o \
58 $(OBJS)\test_uris.o
59 TEST_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) \
60 -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
61 $(__UNICODE_DEFINE_p) -I.\..\include -I$(SETUPHDIR) -W -Wall -I. \
62 $(__DLLFLAG_p) -I.\..\samples -DNOPCH $(CPPUNIT_CFLAGS) $(__EXCEPTIONSFLAG) \
63 $(__EXCEPTIONSFLAG_0) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
64 TEST_GUI_OBJECTS = \
65 $(OBJS)\test_gui_sample_rc.o \
66 $(OBJS)\test_gui_dummy.o \
67 $(OBJS)\test_gui_test.o \
68 $(OBJS)\test_gui_rect.o \
69 $(OBJS)\test_gui_size.o \
70 $(OBJS)\test_gui_point.o
71
72 ### Conditionally set variables: ###
73
74 ifeq ($(GCC_VERSION),2.95)
75 GCCFLAGS = -fvtable-thunks
76 endif
77 ifeq ($(USE_GUI),0)
78 PORTNAME = base
79 endif
80 ifeq ($(USE_GUI),1)
81 PORTNAME = msw
82 endif
83 ifeq ($(BUILD),debug)
84 ifeq ($(DEBUG_FLAG),default)
85 WXDEBUGFLAG = d
86 endif
87 endif
88 ifeq ($(DEBUG_FLAG),1)
89 WXDEBUGFLAG = d
90 endif
91 ifeq ($(UNICODE),1)
92 WXUNICODEFLAG = u
93 endif
94 ifeq ($(WXUNIV),1)
95 WXUNIVNAME = univ
96 endif
97 ifeq ($(SHARED),1)
98 WXDLLFLAG = dll
99 endif
100 ifeq ($(SHARED),0)
101 LIBTYPE_SUFFIX = lib
102 endif
103 ifeq ($(SHARED),1)
104 LIBTYPE_SUFFIX = dll
105 endif
106 ifeq ($(MONOLITHIC),0)
107 EXTRALIBS_FOR_BASE =
108 endif
109 ifeq ($(MONOLITHIC),1)
110 EXTRALIBS_FOR_BASE =
111 endif
112 ifeq ($(MONOLITHIC),0)
113 __WXLIB_NET_p = \
114 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net
115 endif
116 ifeq ($(USE_GUI),1)
117 __test_gui___depname = $(OBJS)\test_gui.exe
118 endif
119 ifeq ($(WXUNIV),1)
120 __WXUNIV_DEFINE_p_3 = --define __WXUNIVERSAL__
121 endif
122 ifeq ($(BUILD),debug)
123 ifeq ($(DEBUG_FLAG),default)
124 __DEBUG_DEFINE_p_3 = --define __WXDEBUG__
125 endif
126 endif
127 ifeq ($(DEBUG_FLAG),1)
128 __DEBUG_DEFINE_p_3 = --define __WXDEBUG__
129 endif
130 ifeq ($(UNICODE),1)
131 __UNICODE_DEFINE_p_3 = --define _UNICODE
132 endif
133 ifeq ($(SHARED),1)
134 __DLLFLAG_p_3 = --define WXUSINGDLL
135 endif
136 ifeq ($(MONOLITHIC),0)
137 __WXLIB_CORE_p = \
138 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
139 endif
140 ifeq ($(BUILD),debug)
141 __OPTIMIZEFLAG = -O0
142 endif
143 ifeq ($(BUILD),release)
144 __OPTIMIZEFLAG = -O2
145 endif
146 ifeq ($(USE_EXCEPTIONS),0)
147 __EXCEPTIONSFLAG = -fno-rtti
148 endif
149 ifeq ($(USE_EXCEPTIONS),1)
150 __EXCEPTIONSFLAG =
151 endif
152 ifeq ($(USE_EXCEPTIONS),0)
153 __EXCEPTIONSFLAG_0 = -fno-exceptions
154 endif
155 ifeq ($(USE_EXCEPTIONS),1)
156 __EXCEPTIONSFLAG_0 =
157 endif
158 ifeq ($(WXUNIV),1)
159 __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
160 endif
161 ifeq ($(BUILD),debug)
162 ifeq ($(DEBUG_FLAG),default)
163 __DEBUG_DEFINE_p = -D__WXDEBUG__
164 endif
165 endif
166 ifeq ($(DEBUG_FLAG),1)
167 __DEBUG_DEFINE_p = -D__WXDEBUG__
168 endif
169 ifeq ($(UNICODE),1)
170 __UNICODE_DEFINE_p = -D_UNICODE
171 endif
172 ifeq ($(SHARED),1)
173 __DLLFLAG_p = -DWXUSINGDLL
174 endif
175 ifeq ($(MONOLITHIC),0)
176 __WXLIB_BASE_p = \
177 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
178 endif
179 ifeq ($(MONOLITHIC),1)
180 __WXLIB_MONO_p = \
181 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
182 endif
183 ifeq ($(USE_GUI),1)
184 __LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
185 endif
186 ifeq ($(USE_GUI),1)
187 __LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
188 endif
189 ifeq ($(USE_GUI),1)
190 __LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
191 endif
192 ifeq ($(MSLU),1)
193 __UNICOWS_LIB_p = -lunicows
194 endif
195 ifeq ($(BUILD),debug)
196 ifeq ($(DEBUG_INFO),default)
197 __DEBUGINFO = -g
198 endif
199 endif
200 ifeq ($(BUILD),release)
201 ifeq ($(DEBUG_INFO),default)
202 __DEBUGINFO =
203 endif
204 endif
205 ifeq ($(DEBUG_INFO),0)
206 __DEBUGINFO =
207 endif
208 ifeq ($(DEBUG_INFO),1)
209 __DEBUGINFO = -g
210 endif
211
212
213 all: $(OBJS)
214 $(OBJS):
215 -if not exist $(OBJS) mkdir $(OBJS)
216
217 ### Targets: ###
218
219 all: $(OBJS)\test.exe $(__test_gui___depname) data
220
221 clean:
222 -if exist $(OBJS)\*.o del $(OBJS)\*.o
223 -if exist $(OBJS)\test.exe del $(OBJS)\test.exe
224 -if exist $(OBJS)\test_gui.exe del $(OBJS)\test_gui.exe
225
226 $(OBJS)\test.exe: $(TEST_OBJECTS)
227 $(CXX) -o $@ $(TEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) $(CPPUNIT_LIBS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
228
229 ifeq ($(USE_GUI),1)
230 $(OBJS)\test_gui.exe: $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample_rc.o
231 $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) $(CPPUNIT_LIBS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
232 endif
233
234 data:
235 if not exist $(OBJS) mkdir $(OBJS)
236 for %%f in (testdata.fc) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
237
238 $(OBJS)\test_dummy.o: ./dummy.cpp
239 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
240
241 $(OBJS)\test_test.o: ./test.cpp
242 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
243
244 $(OBJS)\test_archivetest.o: ./archive/archivetest.cpp
245 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
246
247 $(OBJS)\test_ziptest.o: ./archive/ziptest.cpp
248 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
249
250 $(OBJS)\test_arrays.o: ./arrays/arrays.cpp
251 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
252
253 $(OBJS)\test_datetimetest.o: ./datetime/datetimetest.cpp
254 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
255
256 $(OBJS)\test_fileconftest.o: ./fileconf/fileconftest.cpp
257 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
258
259 $(OBJS)\test_filekind.o: ./filekind/filekind.cpp
260 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
261
262 $(OBJS)\test_filenametest.o: ./filename/filenametest.cpp
263 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
264
265 $(OBJS)\test_filesystest.o: ./filesys/filesystest.cpp
266 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
267
268 $(OBJS)\test_fontmaptest.o: ./fontmap/fontmaptest.cpp
269 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
270
271 $(OBJS)\test_formatconvertertest.o: ./formatconverter/formatconvertertest.cpp
272 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
273
274 $(OBJS)\test_hashes.o: ./hashes/hashes.cpp
275 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
276
277 $(OBJS)\test_lists.o: ./lists/lists.cpp
278 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
279
280 $(OBJS)\test_longlongtest.o: ./longlong/longlongtest.cpp
281 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
282
283 $(OBJS)\test_mbconvtest.o: ./mbconv/mbconvtest.cpp
284 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
285
286 $(OBJS)\test_regextest.o: ./regex/regextest.cpp
287 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
288
289 $(OBJS)\test_wxregextest.o: ./regex/wxregextest.cpp
290 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
291
292 $(OBJS)\test_strings.o: ./strings/strings.cpp
293 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
294
295 $(OBJS)\test_stdstrings.o: ./strings/stdstrings.cpp
296 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
297
298 $(OBJS)\test_unicode.o: ./strings/unicode.cpp
299 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
300
301 $(OBJS)\test_crt.o: ./strings/crt.cpp
302 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
303
304 $(OBJS)\test_bstream.o: ./streams/bstream.cpp
305 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
306
307 $(OBJS)\test_datastreamtest.o: ./streams/datastreamtest.cpp
308 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
309
310 $(OBJS)\test_ffilestream.o: ./streams/ffilestream.cpp
311 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
312
313 $(OBJS)\test_filestream.o: ./streams/filestream.cpp
314 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
315
316 $(OBJS)\test_largefile.o: ./streams/largefile.cpp
317 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
318
319 $(OBJS)\test_memstream.o: ./streams/memstream.cpp
320 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
321
322 $(OBJS)\test_sstream.o: ./streams/sstream.cpp
323 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
324
325 $(OBJS)\test_textstreamtest.o: ./streams/textstreamtest.cpp
326 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
327
328 $(OBJS)\test_zlibstream.o: ./streams/zlibstream.cpp
329 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
330
331 $(OBJS)\test_uris.o: ./uris/uris.cpp
332 $(CXX) -c -o $@ $(TEST_CXXFLAGS) $<
333
334 $(OBJS)\test_gui_sample_rc.o: ./../samples/sample.rc
335 windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) --include-dir ./../include --include-dir $(SETUPHDIR) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../samples
336
337 $(OBJS)\test_gui_dummy.o: ./dummy.cpp
338 $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $<
339
340 $(OBJS)\test_gui_test.o: ./test.cpp
341 $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $<
342
343 $(OBJS)\test_gui_rect.o: ./geometry/rect.cpp
344 $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $<
345
346 $(OBJS)\test_gui_size.o: ./geometry/size.cpp
347 $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $<
348
349 $(OBJS)\test_gui_point.o: ./geometry/point.cpp
350 $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $<
351
352 .PHONY: all clean data
353