added tests for wx's CRT wrappers (so far only wxGetEnv,wxSetEnv)
[wxWidgets.git] / tests / makefile.vc
1 # =========================================================================
2 #     This makefile was generated by
3 #     Bakefile 0.1.4 (http://bakefile.sourceforge.net)
4 #     Do not modify, all changes will be overwritten!
5 # =========================================================================
6
7 !include <../build/msw/config.vc>
8
9 # -------------------------------------------------------------------------
10 # Do not modify the rest of this file!
11 # -------------------------------------------------------------------------
12
13 ### Variables: ###
14
15 OBJS = \
16         vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
17 SETUPHDIR = \
18         $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
19 TEST_CXXFLAGS = /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \
20         $(__DEBUGINFO_0) /Fd$(OBJS)\test.pdb $(____DEBUGRUNTIME_2_p) \
21         $(__OPTIMIZEFLAG_4) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
22         $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\include /I$(SETUPHDIR) /W4 \
23         /I. $(__DLLFLAG_p) /D_CONSOLE $(CPPUNIT_CFLAGS) $(__EXCEPTIONSFLAG_8) \
24         $(__EXCEPTIONSFLAG_9) $(CPPFLAGS) $(CXXFLAGS)
25 TEST_OBJECTS =  \
26         $(OBJS)\test_test.obj \
27         $(OBJS)\test_main.obj \
28         $(OBJS)\test_formatconverter.obj \
29         $(OBJS)\test_regex.obj \
30         $(OBJS)\test_wxregex.obj \
31         $(OBJS)\test_filesys.obj \
32         $(OBJS)\test_arrays.obj \
33         $(OBJS)\test_hashes.obj \
34         $(OBJS)\test_longlong.obj \
35         $(OBJS)\test_strings.obj \
36         $(OBJS)\test_stdstrings.obj \
37         $(OBJS)\test_unicode.obj \
38         $(OBJS)\test_crt.obj \
39         $(OBJS)\test_bstream.obj \
40         $(OBJS)\test_ffilestream.obj \
41         $(OBJS)\test_filestream.obj \
42         $(OBJS)\test_memstream.obj \
43         $(OBJS)\test_zlibstream.obj
44
45 ### Conditionally set variables: ###
46
47 !if "$(USE_GUI)" == "0"
48 PORTNAME = base
49 !endif
50 !if "$(USE_GUI)" == "1"
51 PORTNAME = msw
52 !endif
53 !if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
54 WXDEBUGFLAG = d
55 !endif
56 !if "$(DEBUG_FLAG)" == "1"
57 WXDEBUGFLAG = d
58 !endif
59 !if "$(UNICODE)" == "1"
60 WXUNICODEFLAG = u
61 !endif
62 !if "$(WXUNIV)" == "1"
63 WXUNIVNAME = univ
64 !endif
65 !if "$(SHARED)" == "1"
66 WXDLLFLAG = dll
67 !endif
68 !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
69 __DEBUGINFO_0 = /Zi
70 !endif
71 !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
72 __DEBUGINFO_0 = 
73 !endif
74 !if "$(DEBUG_INFO)" == "0"
75 __DEBUGINFO_0 = 
76 !endif
77 !if "$(DEBUG_INFO)" == "1"
78 __DEBUGINFO_0 = /Zi
79 !endif
80 !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
81 __DEBUGINFO_1 = /DEBUG
82 !endif
83 !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
84 __DEBUGINFO_1 = 
85 !endif
86 !if "$(DEBUG_INFO)" == "0"
87 __DEBUGINFO_1 = 
88 !endif
89 !if "$(DEBUG_INFO)" == "1"
90 __DEBUGINFO_1 = /DEBUG
91 !endif
92 !if "$(DEBUG_RUNTIME_LIBS)" == "0"
93 ____DEBUGRUNTIME_2_p = 
94 !endif
95 !if "$(DEBUG_RUNTIME_LIBS)" == "1"
96 ____DEBUGRUNTIME_2_p = /D_DEBUG
97 !endif
98 !if "$(DEBUG_RUNTIME_LIBS)" == "default"
99 ____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p)
100 !endif
101 !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
102 ____DEBUGINFO_2_p = /D_DEBUG
103 !endif
104 !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
105 ____DEBUGINFO_2_p = 
106 !endif
107 !if "$(DEBUG_INFO)" == "0"
108 ____DEBUGINFO_2_p = 
109 !endif
110 !if "$(DEBUG_INFO)" == "1"
111 ____DEBUGINFO_2_p = /D_DEBUG
112 !endif
113 !if "$(DEBUG_RUNTIME_LIBS)" == "0"
114 __DEBUGRUNTIME_3 = 
115 !endif
116 !if "$(DEBUG_RUNTIME_LIBS)" == "1"
117 __DEBUGRUNTIME_3 = d
118 !endif
119 !if "$(DEBUG_RUNTIME_LIBS)" == "default"
120 __DEBUGRUNTIME_3 = $(__DEBUGINFO_3)
121 !endif
122 !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
123 __DEBUGINFO_3 = d
124 !endif
125 !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
126 __DEBUGINFO_3 = 
127 !endif
128 !if "$(DEBUG_INFO)" == "0"
129 __DEBUGINFO_3 = 
130 !endif
131 !if "$(DEBUG_INFO)" == "1"
132 __DEBUGINFO_3 = d
133 !endif
134 !if "$(BUILD)" == "debug"
135 __OPTIMIZEFLAG_4 = /Od
136 !endif
137 !if "$(BUILD)" == "release"
138 __OPTIMIZEFLAG_4 = /O2
139 !endif
140 !if "$(RUNTIME_LIBS)" == "dynamic"
141 __RUNTIME_LIBS_7 = D
142 !endif
143 !if "$(RUNTIME_LIBS)" == "static"
144 __RUNTIME_LIBS_7 = T
145 !endif
146 !if "$(USE_EXCEPTIONS)" == "0"
147 __EXCEPTIONSFLAG_8 = 
148 !endif
149 !if "$(USE_EXCEPTIONS)" == "1"
150 __EXCEPTIONSFLAG_8 = /GR
151 !endif
152 !if "$(USE_EXCEPTIONS)" == "0"
153 __EXCEPTIONSFLAG_9 = 
154 !endif
155 !if "$(USE_EXCEPTIONS)" == "1"
156 __EXCEPTIONSFLAG_9 = /GX
157 !endif
158 !if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
159 __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
160 !endif
161 !if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
162 __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
163 !endif
164 !if "$(WXUNIV)" == "1"
165 __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
166 !endif
167 !if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
168 __DEBUG_DEFINE_p = /D__WXDEBUG__
169 !endif
170 !if "$(DEBUG_FLAG)" == "1"
171 __DEBUG_DEFINE_p = /D__WXDEBUG__
172 !endif
173 !if "$(UNICODE)" == "1"
174 __UNICODE_DEFINE_p = /D_UNICODE
175 !endif
176 !if "$(SHARED)" == "1"
177 __DLLFLAG_p = /DWXUSINGDLL
178 !endif
179 !if "$(MONOLITHIC)" == "0"
180 __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
181 !endif
182 !if "$(MONOLITHIC)" == "1"
183 __WXLIB_MONO_p = \
184         wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
185 !endif
186 !if "$(USE_GUI)" == "1"
187 __LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
188 !endif
189 !if "$(USE_GUI)" == "1"
190 __LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
191 !endif
192 !if "$(USE_GUI)" == "1"
193 __LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
194 !endif
195 !if "$(MSLU)" == "1"
196 __UNICOWS_LIB_p = unicows.lib
197 !endif
198 !if "$(SHARED)" == "0"
199 LIBDIRNAME = .\..\lib\vc_lib$(CFG)
200 !endif
201 !if "$(SHARED)" == "1"
202 LIBDIRNAME = .\..\lib\vc_dll$(CFG)
203 !endif
204
205
206 all: $(OBJS)
207 $(OBJS):
208         -if not exist $(OBJS) mkdir $(OBJS)
209
210 ### Targets: ###
211
212 all: $(OBJS)\test.exe data
213
214 clean: 
215         -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
216         -if exist $(OBJS)\*.res del $(OBJS)\*.res
217         -if exist $(OBJS)\test.exe del $(OBJS)\test.exe
218         -if exist $(OBJS)\test.ilk del $(OBJS)\test.ilk
219         -if exist $(OBJS)\test.pdb del $(OBJS)\test.pdb
220
221 $(OBJS)\test.exe: $(TEST_OBJECTS)
222         link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1)  /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(CPPUNIT_LIBS) @<<
223         $(TEST_OBJECTS)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib  $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib
224 <<
225
226 data: 
227         if not exist $(OBJS) mkdir $(OBJS)
228         for %f in (testdata.fc) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
229
230 $(OBJS)\test_test.obj: .\test.cpp
231         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
232
233 $(OBJS)\test_main.obj: .\mbconv\main.cpp
234         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
235
236 $(OBJS)\test_formatconverter.obj: .\formatconverter\formatconverter.cpp
237         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
238
239 $(OBJS)\test_regex.obj: .\regex\regex.cpp
240         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
241
242 $(OBJS)\test_wxregex.obj: .\regex\wxregex.cpp
243         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
244
245 $(OBJS)\test_filesys.obj: .\filesys\filesys.cpp
246         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
247
248 $(OBJS)\test_arrays.obj: .\arrays\arrays.cpp
249         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
250
251 $(OBJS)\test_hashes.obj: .\hashes\hashes.cpp
252         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
253
254 $(OBJS)\test_longlong.obj: .\longlong\longlong.cpp
255         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
256
257 $(OBJS)\test_strings.obj: .\strings\strings.cpp
258         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
259
260 $(OBJS)\test_stdstrings.obj: .\strings\stdstrings.cpp
261         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
262
263 $(OBJS)\test_unicode.obj: .\strings\unicode.cpp
264         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
265
266 $(OBJS)\test_crt.obj: .\strings\crt.cpp
267         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
268
269 $(OBJS)\test_bstream.obj: .\streams\bstream.cpp
270         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
271
272 $(OBJS)\test_ffilestream.obj: .\streams\ffilestream.cpp
273         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
274
275 $(OBJS)\test_filestream.obj: .\streams\filestream.cpp
276         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
277
278 $(OBJS)\test_memstream.obj: .\streams\memstream.cpp
279         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**
280
281 $(OBJS)\test_zlibstream.obj: .\streams\zlibstream.cpp
282         $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) $**