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