1 | # $Id: Makefile.kmk 20108 2009-05-27 22:31:48Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the IPRT testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # The contents of this file may alternatively be used under the terms
|
---|
18 | # of the Common Development and Distribution License Version 1.0
|
---|
19 | # (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | # VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | # CDDL are applicable instead of those of the GPL.
|
---|
22 | #
|
---|
23 | # You may elect to license modified versions of this file under the
|
---|
24 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | #
|
---|
26 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
27 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
28 | # additional information or have any questions.
|
---|
29 | #
|
---|
30 |
|
---|
31 | SUB_DEPTH = ../../../..
|
---|
32 | include $(KBUILD_PATH)/subheader.kmk
|
---|
33 |
|
---|
34 | ifdef VBOX_WITH_TESTCASES
|
---|
35 |
|
---|
36 | #
|
---|
37 | # Globals
|
---|
38 | #
|
---|
39 | # WARNING: Careful with this wrt to the other sub-makefiles this joins.
|
---|
40 | #
|
---|
41 | TEMPLATE = VBOXR3TSTEXE
|
---|
42 |
|
---|
43 | # Defined by the parent makefile as well (for errmsgdata.h).
|
---|
44 | IPRT_OUT_DIR ?= $(PATH_TARGET)/Runtime
|
---|
45 |
|
---|
46 |
|
---|
47 | #
|
---|
48 | # Target lists
|
---|
49 | #
|
---|
50 | PROGRAMS += \
|
---|
51 | tstRTAvl \
|
---|
52 | tstRTBase64 \
|
---|
53 | tstRTBitOperations \
|
---|
54 | tstRTCidr \
|
---|
55 | tstRTCritSect \
|
---|
56 | tstDeadlock \
|
---|
57 | tstDir \
|
---|
58 | tstDir-2 \
|
---|
59 | tstDir-3 \
|
---|
60 | tstEnv \
|
---|
61 | tstErrUnique \
|
---|
62 | tstFile \
|
---|
63 | tstFileLock \
|
---|
64 | tstFork \
|
---|
65 | tstGetOpt \
|
---|
66 | tstHandleTable \
|
---|
67 | tstHeapSimple \
|
---|
68 | tstInlineAsm \
|
---|
69 | tstLdr \
|
---|
70 | tstLdr-2 \
|
---|
71 | tstLdr-3 \
|
---|
72 | tstLdr-4 \
|
---|
73 | tstLdrLoad \
|
---|
74 | tstLog \
|
---|
75 | tstMemAutoPtr \
|
---|
76 | tstMove \
|
---|
77 | tstMp-1 \
|
---|
78 | tstNoCrt-1 \
|
---|
79 | tstOnce \
|
---|
80 | tstPath \
|
---|
81 | tstPrfRT \
|
---|
82 | tstRand \
|
---|
83 | tstRTFsQueries \
|
---|
84 | tstR0ThreadPreemptionDriver \
|
---|
85 | tstSems \
|
---|
86 | tstSemPingPong \
|
---|
87 | tstStrFormat \
|
---|
88 | tstStrSimplePattern \
|
---|
89 | tstStrToNum \
|
---|
90 | tstSystemQueryOsInfo \
|
---|
91 | tstTermCallbacks \
|
---|
92 | tstThread-1 \
|
---|
93 | tstTime \
|
---|
94 | tstTime-2 \
|
---|
95 | tstTime-3 \
|
---|
96 | tstTime-4 \
|
---|
97 | tstTimer \
|
---|
98 | tstTimerLR \
|
---|
99 | tstTimeSpec \
|
---|
100 | tstTSC \
|
---|
101 | tstUtf8 \
|
---|
102 | tstUuid
|
---|
103 | # tstSems
|
---|
104 | PROGRAMS.win += \
|
---|
105 | tstRTProcWait \
|
---|
106 | tstRTCritSectW32 \
|
---|
107 | tstFileAppendWin-1 \
|
---|
108 | ntGetTimerResolution
|
---|
109 | PROGRAMS.linux += \
|
---|
110 | tstRTProcWait \
|
---|
111 | tstRTProcIsRunningByName \
|
---|
112 | tstRTBitOperationsPIC3 \
|
---|
113 | tstInlineAsmPIC \
|
---|
114 | tstInlineAsmPIC3 \
|
---|
115 | tstSemMutex
|
---|
116 | PROGRAMS.l4 += \
|
---|
117 | tstIoCtl
|
---|
118 | PROGRAMS.darwin += \
|
---|
119 | tstDarwinSched
|
---|
120 | SYSMODS += \
|
---|
121 | tstLdrObj \
|
---|
122 | tstLdrObjR0 \
|
---|
123 | tstR0ThreadPreemption
|
---|
124 | if1of ($(VBOX_LDR_FMT)), lx pe)
|
---|
125 | LIBRARIES += \
|
---|
126 | tstLdr-4Imp
|
---|
127 | endif
|
---|
128 | ifdef RT_ASYNC_IO_CODE
|
---|
129 | PROGRAMS += \
|
---|
130 | tstFileAio
|
---|
131 | endif
|
---|
132 |
|
---|
133 | if defined(VBOX_WITH_LIBXML2_IN_VBOXRT)
|
---|
134 | PROGRAMS += \
|
---|
135 | tstRTS3
|
---|
136 | endif
|
---|
137 |
|
---|
138 |
|
---|
139 | #
|
---|
140 | # Target configs in almost alphabetical order.
|
---|
141 | #
|
---|
142 |
|
---|
143 | tstRTAvl_TEMPLATE = VBOXR3TSTEXE
|
---|
144 | tstRTAvl_SOURCES = tstRTAvl.cpp
|
---|
145 |
|
---|
146 | tstRTBase64_TEMPLATE = VBOXR3TSTEXE
|
---|
147 | tstRTBase64_SOURCES = tstRTBase64.cpp
|
---|
148 |
|
---|
149 | tstRTBitOperations_TEMPLATE = VBOXR3TSTEXE
|
---|
150 | tstRTBitOperations_SOURCES = tstRTBitOperations.cpp
|
---|
151 |
|
---|
152 | tstRTBitOperationsPIC3_TEMPLATE = VBOXR3TSTEXE
|
---|
153 | tstRTBitOperationsPIC3_SOURCES = tstRTBitOperations.cpp
|
---|
154 | tstRTBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
155 | tstRTBitOperationsPIC3_DEFS = PIC
|
---|
156 |
|
---|
157 | tstRTCidr_TEMPLATE = VBOXR3TSTEXE
|
---|
158 | tstRTCidr_SOURCES = tstRTCidr.cpp
|
---|
159 |
|
---|
160 | tstRTCritSect_TEMPLATE = VBOXR3TSTEXE
|
---|
161 | tstRTCritSect_SOURCES = tstRTCritSect.cpp
|
---|
162 |
|
---|
163 | tstRTCritSectW32_TEMPLATE = VBOXR3TSTEXE
|
---|
164 | tstRTCritSectW32_SOURCES = tstRTCritSect.cpp
|
---|
165 | tstRTCritSectW32_DEFS = TRY_WIN32_CRIT
|
---|
166 |
|
---|
167 | tstDeadlock_SOURCES = tstDeadlock.cpp
|
---|
168 |
|
---|
169 | tstDir_SOURCES = tstDir.cpp
|
---|
170 |
|
---|
171 | tstDir-2_SOURCES = tstDir-2.cpp
|
---|
172 |
|
---|
173 | tstDir-3_SOURCES = tstDir-3.cpp
|
---|
174 |
|
---|
175 | tstEnv_SOURCES = tstEnv.cpp
|
---|
176 |
|
---|
177 | # Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
|
---|
178 | tstErrUnique_SOURCES = tstErrUnique.cpp
|
---|
179 | tstErrUnique_INCS = $(IPRT_OUT_DIR)/
|
---|
180 | tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
|
---|
181 |
|
---|
182 | tstFile_SOURCES = tstFile.cpp
|
---|
183 |
|
---|
184 | tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
|
---|
185 |
|
---|
186 | tstFileAio_SOURCES = tstFileAio.cpp
|
---|
187 |
|
---|
188 | tstFileLock_SOURCES = tstFileLock.cpp
|
---|
189 |
|
---|
190 | tstFork_SOURCES = tstFork.cpp
|
---|
191 |
|
---|
192 | tstGetOpt_SOURCES = tstGetOpt.cpp
|
---|
193 |
|
---|
194 | tstHandleTable_SOURCES = tstHandleTable.cpp
|
---|
195 |
|
---|
196 | tstHeapSimple_SOURCES = tstHeapSimple.cpp
|
---|
197 |
|
---|
198 | tstIoCtl_SOURCES = tstIoCtl.cpp
|
---|
199 |
|
---|
200 | tstInlineAsm_SOURCES = tstInlineAsm.cpp
|
---|
201 |
|
---|
202 | tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
|
---|
203 | tstInlineAsmPIC_CXXFLAGS = -fPIC
|
---|
204 | tstInlineAsmPIC_DEFS = PIC
|
---|
205 |
|
---|
206 | tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
|
---|
207 | tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
208 | tstInlineAsmPIC3_DEFS = PIC
|
---|
209 |
|
---|
210 | tstLdr_SOURCES = tstLdr.cpp
|
---|
211 |
|
---|
212 | tstLdr-2_SOURCES = tstLdr-2.cpp
|
---|
213 | tstLdr-2_DEFS = IN_DIS
|
---|
214 | tstLdr-2_LIBS = \
|
---|
215 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
216 |
|
---|
217 | tstLdrObj_TEMPLATE = VBOXGC
|
---|
218 | tstLdrObj_INST = $(INST_TESTCASE)
|
---|
219 | tstLdrObj_SYSSUFF = .gc
|
---|
220 | tstLdrObj_SOURCES = tstLdrObj.cpp
|
---|
221 | tstLdrObj_DEFS = IN_DIS IN_RT_GC IN_RT_RC DIS_CORE_ONLY
|
---|
222 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
223 | tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
224 | endif
|
---|
225 | tstLdrObj_LIBS = \
|
---|
226 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
227 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
228 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
229 | tstLdrObj_LDFLAGS = -Entry:Entrypoint
|
---|
230 | tstLdrObj_LIBS += \
|
---|
231 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
232 | endif # PE
|
---|
233 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
234 | tstLdrObj_LDFLAGS = -e Entrypoint
|
---|
235 | endif
|
---|
236 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
237 | tstLdrObj_LIBS += \
|
---|
238 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
239 | endif
|
---|
240 |
|
---|
241 | tstLdr-3_SOURCES = tstLdr-3.cpp
|
---|
242 | tstLdr-3_DEFS = IN_DIS
|
---|
243 | tstLdr-3_LIBS = \
|
---|
244 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
245 |
|
---|
246 | tstLdr-4Imp_TEMPLATE = VBOXR0
|
---|
247 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
248 | tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
|
---|
249 | else ifeq ($(VBOX_LDR_FMT),pe)
|
---|
250 | tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
|
---|
251 | endif
|
---|
252 |
|
---|
253 | tstLdrObjR0_TEMPLATE = VBOXR0
|
---|
254 | tstLdrObjR0_INST = $(INST_TESTCASE)
|
---|
255 | tstLdrObjR0_SYSSUFF = .r0
|
---|
256 | tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
|
---|
257 | tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
|
---|
258 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
259 | tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
260 | endif
|
---|
261 | tstLdrObjR0_LIBS = \
|
---|
262 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
|
---|
263 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
264 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
265 | tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
|
---|
266 | tstLdrObjR0_LIBS += \
|
---|
267 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
268 | $(TARGET_tstLdr-4Imp)
|
---|
269 | endif
|
---|
270 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
271 | tstLdrObjR0_LDFLAGS = -e Entrypoint
|
---|
272 | endif
|
---|
273 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
274 | tstLdrObjR0_LIBS += \
|
---|
275 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
276 | $(TARGET_tstLdr-4Imp)
|
---|
277 | endif
|
---|
278 |
|
---|
279 | tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
|
---|
280 | tstLdr-4_DEFS = IN_DIS
|
---|
281 | tstLdr-4_LIBS = \
|
---|
282 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
283 |
|
---|
284 | tstLdrLoad_SOURCES = tstLdrLoad.cpp
|
---|
285 |
|
---|
286 | tstLog_SOURCES = tstLog.cpp
|
---|
287 |
|
---|
288 | tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
|
---|
289 |
|
---|
290 | tstMove_SOURCES = tstMove.cpp
|
---|
291 |
|
---|
292 | tstMp-1_SOURCES = tstMp-1.cpp
|
---|
293 |
|
---|
294 | tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
|
---|
295 | tstNoCrt-1_SOURCES = \
|
---|
296 | tstNoCrt-1.cpp \
|
---|
297 | ../common/string/memcpy.asm \
|
---|
298 | ../common/string/mempcpy.asm \
|
---|
299 | ../common/string/memmove.asm \
|
---|
300 | ../common/string/memset.asm \
|
---|
301 | ../common/string/memchr.asm \
|
---|
302 | ../common/string/memcmp.asm \
|
---|
303 | ../common/string/strchr.asm \
|
---|
304 | ../common/string/strcmp.asm \
|
---|
305 | ../common/string/strcpy.asm \
|
---|
306 | ../common/string/strlen.asm
|
---|
307 |
|
---|
308 | tstOnce_SOURCES = tstOnce.cpp
|
---|
309 |
|
---|
310 | tstPath_SOURCES = tstPath.cpp
|
---|
311 |
|
---|
312 | tstPrfRT_SOURCES = tstPrfRT.cpp
|
---|
313 |
|
---|
314 | tstRand_SOURCES = tstRand.cpp
|
---|
315 |
|
---|
316 | tstR0ThreadPreemption_TEMPLATE = VBOXR0
|
---|
317 | tstR0ThreadPreemption_INST = $(INST_TESTCASE)
|
---|
318 | tstR0ThreadPreemption_DEFS = IN_RT_R0
|
---|
319 | tstR0ThreadPreemption_SYSSUFF = .r0
|
---|
320 | tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
|
---|
321 | tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
322 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
323 | tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
324 | endif
|
---|
325 |
|
---|
326 | tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
|
---|
327 |
|
---|
328 | tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
|
---|
329 |
|
---|
330 | tstRTProcWait_SOURCES = tstRTProcWait.cpp
|
---|
331 |
|
---|
332 | tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
|
---|
333 |
|
---|
334 | tstRTS3_SOURCES = tstRTS3.cpp
|
---|
335 |
|
---|
336 | tstSemMutex_SOURCES = tstSemMutex.cpp
|
---|
337 |
|
---|
338 | tstSemPingPong_SOURCES = tstSemPingPong.cpp
|
---|
339 |
|
---|
340 | tstSems_SOURCES = tstSems.cpp
|
---|
341 |
|
---|
342 | tstStrFormat_SOURCES = tstStrFormat.cpp
|
---|
343 |
|
---|
344 | tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
|
---|
345 |
|
---|
346 | tstStrToNum_SOURCES = tstStrToNum.cpp
|
---|
347 |
|
---|
348 | tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
|
---|
349 |
|
---|
350 | tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
|
---|
351 |
|
---|
352 | tstThread-1_SOURCES = tstThread-1.cpp
|
---|
353 |
|
---|
354 | tstTime_SOURCES = tstTime.cpp
|
---|
355 |
|
---|
356 | tstTime-2_SOURCES = tstTime-2.cpp
|
---|
357 |
|
---|
358 | tstTime-3_SOURCES = tstTime-3.cpp
|
---|
359 |
|
---|
360 | tstTime-4_SOURCES = tstTime-4.cpp
|
---|
361 |
|
---|
362 | tstTimer_SOURCES = tstTimer.cpp
|
---|
363 |
|
---|
364 | tstTimerLR_SOURCES = tstTimerLR.cpp
|
---|
365 |
|
---|
366 | tstTimeSpec_SOURCES = tstTimeSpec.cpp
|
---|
367 |
|
---|
368 | tstTSC_SOURCES = tstTSC.cpp
|
---|
369 | tstTSC_CXXFLAGS.linux += -O3
|
---|
370 |
|
---|
371 | tstUuid_SOURCES = tstUuid.cpp
|
---|
372 |
|
---|
373 | tstUtf8_SOURCES = tstUtf8.cpp
|
---|
374 |
|
---|
375 |
|
---|
376 | #
|
---|
377 | # odds and ends
|
---|
378 | #
|
---|
379 |
|
---|
380 | tstDarwinSched_SOURCES = tstDarwinSched.cpp
|
---|
381 |
|
---|
382 | ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
|
---|
383 | ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
384 |
|
---|
385 | endif # VBOX_WITH_TESTCASES
|
---|
386 |
|
---|
387 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
388 |
|
---|