1 | # $Id: Makefile.kmk 21286 2009-07-07 00:53:55Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the IPRT testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2009 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 | tstRTMemPool \
|
---|
77 | tstRTR0MemUserKernelDriver \
|
---|
78 | tstMove \
|
---|
79 | tstMp-1 \
|
---|
80 | tstNoCrt-1 \
|
---|
81 | tstOnce \
|
---|
82 | tstPath \
|
---|
83 | tstPrfRT \
|
---|
84 | tstRand \
|
---|
85 | tstRTFsQueries \
|
---|
86 | tstR0ThreadPreemptionDriver \
|
---|
87 | tstRTS3 \
|
---|
88 | tstSems \
|
---|
89 | tstSemPingPong \
|
---|
90 | tstRTStrCache \
|
---|
91 | tstStrFormat \
|
---|
92 | tstStrSimplePattern \
|
---|
93 | tstStrToNum \
|
---|
94 | tstSystemQueryOsInfo \
|
---|
95 | tstRTTemp \
|
---|
96 | tstTermCallbacks \
|
---|
97 | tstThread-1 \
|
---|
98 | tstTime \
|
---|
99 | tstTime-2 \
|
---|
100 | tstTime-3 \
|
---|
101 | tstTime-4 \
|
---|
102 | tstTimer \
|
---|
103 | tstTimerLR \
|
---|
104 | tstTimeSpec \
|
---|
105 | tstTSC \
|
---|
106 | tstUtf8 \
|
---|
107 | tstUuid
|
---|
108 | # tstSems
|
---|
109 | PROGRAMS.win += \
|
---|
110 | tstRTProcWait \
|
---|
111 | tstRTCritSectW32 \
|
---|
112 | tstFileAppendWin-1 \
|
---|
113 | ntGetTimerResolution
|
---|
114 | PROGRAMS.linux += \
|
---|
115 | tstRTProcWait \
|
---|
116 | tstRTProcIsRunningByName \
|
---|
117 | tstRTBitOperationsPIC3 \
|
---|
118 | tstInlineAsmPIC \
|
---|
119 | tstInlineAsmPIC3 \
|
---|
120 | tstSemMutex \
|
---|
121 | tstSemRW
|
---|
122 | PROGRAMS.l4 += \
|
---|
123 | tstIoCtl
|
---|
124 | PROGRAMS.darwin += \
|
---|
125 | tstDarwinSched
|
---|
126 | SYSMODS += \
|
---|
127 | tstLdrObj \
|
---|
128 | tstLdrObjR0 \
|
---|
129 | tstRTR0MemUserKernel \
|
---|
130 | tstR0ThreadPreemption
|
---|
131 | if1of ($(VBOX_LDR_FMT)), lx pe)
|
---|
132 | LIBRARIES += \
|
---|
133 | tstLdr-4Imp
|
---|
134 | endif
|
---|
135 | ifdef RT_ASYNC_IO_CODE
|
---|
136 | PROGRAMS += \
|
---|
137 | tstFileAio
|
---|
138 | endif
|
---|
139 |
|
---|
140 |
|
---|
141 | #
|
---|
142 | # Target configs in almost alphabetical order.
|
---|
143 | #
|
---|
144 |
|
---|
145 | tstRTAvl_TEMPLATE = VBOXR3TSTEXE
|
---|
146 | tstRTAvl_SOURCES = tstRTAvl.cpp
|
---|
147 |
|
---|
148 | tstRTBase64_TEMPLATE = VBOXR3TSTEXE
|
---|
149 | tstRTBase64_SOURCES = tstRTBase64.cpp
|
---|
150 |
|
---|
151 | tstRTBitOperations_TEMPLATE = VBOXR3TSTEXE
|
---|
152 | tstRTBitOperations_SOURCES = tstRTBitOperations.cpp
|
---|
153 |
|
---|
154 | tstRTBitOperationsPIC3_TEMPLATE = VBOXR3TSTEXE
|
---|
155 | tstRTBitOperationsPIC3_SOURCES = tstRTBitOperations.cpp
|
---|
156 | tstRTBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
157 | tstRTBitOperationsPIC3_DEFS = PIC
|
---|
158 |
|
---|
159 | tstRTCidr_TEMPLATE = VBOXR3TSTEXE
|
---|
160 | tstRTCidr_SOURCES = tstRTCidr.cpp
|
---|
161 |
|
---|
162 | tstRTCritSect_TEMPLATE = VBOXR3TSTEXE
|
---|
163 | tstRTCritSect_SOURCES = tstRTCritSect.cpp
|
---|
164 |
|
---|
165 | tstRTCritSectW32_TEMPLATE = VBOXR3TSTEXE
|
---|
166 | tstRTCritSectW32_SOURCES = tstRTCritSect.cpp
|
---|
167 | tstRTCritSectW32_DEFS = TRY_WIN32_CRIT
|
---|
168 |
|
---|
169 | tstDeadlock_SOURCES = tstDeadlock.cpp
|
---|
170 |
|
---|
171 | tstDir_SOURCES = tstDir.cpp
|
---|
172 |
|
---|
173 | tstDir-2_SOURCES = tstDir-2.cpp
|
---|
174 |
|
---|
175 | tstDir-3_SOURCES = tstDir-3.cpp
|
---|
176 |
|
---|
177 | tstEnv_SOURCES = tstEnv.cpp
|
---|
178 |
|
---|
179 | # Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
|
---|
180 | tstErrUnique_SOURCES = tstErrUnique.cpp
|
---|
181 | tstErrUnique_INCS = $(IPRT_OUT_DIR)/
|
---|
182 | tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
|
---|
183 |
|
---|
184 | tstFile_SOURCES = tstFile.cpp
|
---|
185 |
|
---|
186 | tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
|
---|
187 |
|
---|
188 | tstFileAio_SOURCES = tstFileAio.cpp
|
---|
189 |
|
---|
190 | tstFileLock_SOURCES = tstFileLock.cpp
|
---|
191 |
|
---|
192 | tstFork_SOURCES = tstFork.cpp
|
---|
193 |
|
---|
194 | tstGetOpt_SOURCES = tstGetOpt.cpp
|
---|
195 |
|
---|
196 | tstHandleTable_SOURCES = tstHandleTable.cpp
|
---|
197 |
|
---|
198 | tstHeapSimple_SOURCES = tstHeapSimple.cpp
|
---|
199 |
|
---|
200 | tstIoCtl_SOURCES = tstIoCtl.cpp
|
---|
201 |
|
---|
202 | tstInlineAsm_SOURCES = tstInlineAsm.cpp
|
---|
203 |
|
---|
204 | tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
|
---|
205 | tstInlineAsmPIC_CXXFLAGS = -fPIC
|
---|
206 | tstInlineAsmPIC_DEFS = PIC
|
---|
207 |
|
---|
208 | tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
|
---|
209 | tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
210 | tstInlineAsmPIC3_DEFS = PIC
|
---|
211 |
|
---|
212 | tstLdr_SOURCES = tstLdr.cpp
|
---|
213 |
|
---|
214 | tstLdr-2_SOURCES = tstLdr-2.cpp
|
---|
215 | tstLdr-2_DEFS = IN_DIS
|
---|
216 | tstLdr-2_LIBS = \
|
---|
217 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
218 |
|
---|
219 | tstLdrObj_TEMPLATE = VBOXGC
|
---|
220 | tstLdrObj_INST = $(INST_TESTCASE)
|
---|
221 | tstLdrObj_SYSSUFF = .gc
|
---|
222 | tstLdrObj_SOURCES = tstLdrObj.cpp
|
---|
223 | tstLdrObj_DEFS = IN_DIS IN_RT_GC IN_RT_RC DIS_CORE_ONLY
|
---|
224 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
225 | tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
226 | endif
|
---|
227 | tstLdrObj_LIBS = \
|
---|
228 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
229 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
230 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
231 | tstLdrObj_LDFLAGS = -Entry:Entrypoint
|
---|
232 | tstLdrObj_LIBS += \
|
---|
233 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
234 | endif # PE
|
---|
235 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
236 | tstLdrObj_LDFLAGS = -e Entrypoint
|
---|
237 | endif
|
---|
238 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
239 | tstLdrObj_LIBS += \
|
---|
240 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
241 | endif
|
---|
242 |
|
---|
243 | tstLdr-3_SOURCES = tstLdr-3.cpp
|
---|
244 | tstLdr-3_DEFS = IN_DIS
|
---|
245 | tstLdr-3_LIBS = \
|
---|
246 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
247 |
|
---|
248 | tstLdr-4Imp_TEMPLATE = VBOXR0
|
---|
249 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
250 | tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
|
---|
251 | else ifeq ($(VBOX_LDR_FMT),pe)
|
---|
252 | tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
|
---|
253 | endif
|
---|
254 |
|
---|
255 | tstLdrObjR0_TEMPLATE = VBOXR0
|
---|
256 | tstLdrObjR0_INST = $(INST_TESTCASE)
|
---|
257 | tstLdrObjR0_SYSSUFF = .r0
|
---|
258 | tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
|
---|
259 | tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
|
---|
260 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
261 | tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
262 | endif
|
---|
263 | tstLdrObjR0_LIBS = \
|
---|
264 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
|
---|
265 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
266 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
267 | tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
|
---|
268 | tstLdrObjR0_LIBS += \
|
---|
269 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
270 | $(TARGET_tstLdr-4Imp)
|
---|
271 | endif
|
---|
272 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
273 | tstLdrObjR0_LDFLAGS = -e Entrypoint
|
---|
274 | endif
|
---|
275 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
276 | tstLdrObjR0_LIBS += \
|
---|
277 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
278 | $(TARGET_tstLdr-4Imp)
|
---|
279 | endif
|
---|
280 |
|
---|
281 | tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
|
---|
282 | tstLdr-4_DEFS = IN_DIS
|
---|
283 | tstLdr-4_LIBS = \
|
---|
284 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
285 |
|
---|
286 | tstLdrLoad_SOURCES = tstLdrLoad.cpp
|
---|
287 |
|
---|
288 | tstLog_SOURCES = tstLog.cpp
|
---|
289 |
|
---|
290 | tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
|
---|
291 |
|
---|
292 | tstRTMemPool_TEMPLATE = VBOXR3TSTEXE
|
---|
293 | tstRTMemPool_SOURCES = tstRTMemPool.cpp
|
---|
294 |
|
---|
295 | tstRTR0MemUserKernel_TEMPLATE = VBOXR0
|
---|
296 | tstRTR0MemUserKernel_INST = $(INST_TESTCASE)
|
---|
297 | tstRTR0MemUserKernel_DEFS = IN_RT_R0
|
---|
298 | tstRTR0MemUserKernel_SYSSUFF = .r0
|
---|
299 | tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp
|
---|
300 | tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
301 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
302 | tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
303 | endif
|
---|
304 |
|
---|
305 | tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.cpp
|
---|
306 |
|
---|
307 | tstMove_SOURCES = tstMove.cpp
|
---|
308 |
|
---|
309 | tstMp-1_SOURCES = tstMp-1.cpp
|
---|
310 |
|
---|
311 | tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
|
---|
312 | tstNoCrt-1_SOURCES = \
|
---|
313 | tstNoCrt-1.cpp \
|
---|
314 | ../common/string/memcpy.asm \
|
---|
315 | ../common/string/mempcpy.asm \
|
---|
316 | ../common/string/memmove.asm \
|
---|
317 | ../common/string/memset.asm \
|
---|
318 | ../common/string/memchr.asm \
|
---|
319 | ../common/string/memcmp.asm \
|
---|
320 | ../common/string/strchr.asm \
|
---|
321 | ../common/string/strcmp.asm \
|
---|
322 | ../common/string/strcpy.asm \
|
---|
323 | ../common/string/strlen.asm
|
---|
324 |
|
---|
325 | tstOnce_SOURCES = tstOnce.cpp
|
---|
326 |
|
---|
327 | tstPath_SOURCES = tstPath.cpp
|
---|
328 |
|
---|
329 | tstPrfRT_SOURCES = tstPrfRT.cpp
|
---|
330 |
|
---|
331 | tstRand_SOURCES = tstRand.cpp
|
---|
332 |
|
---|
333 | tstR0ThreadPreemption_TEMPLATE = VBOXR0
|
---|
334 | tstR0ThreadPreemption_INST = $(INST_TESTCASE)
|
---|
335 | tstR0ThreadPreemption_DEFS = IN_RT_R0
|
---|
336 | tstR0ThreadPreemption_SYSSUFF = .r0
|
---|
337 | tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
|
---|
338 | tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
339 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
340 | tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
341 | endif
|
---|
342 |
|
---|
343 | tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
|
---|
344 |
|
---|
345 | tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
|
---|
346 |
|
---|
347 | tstRTProcWait_SOURCES = tstRTProcWait.cpp
|
---|
348 |
|
---|
349 | tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
|
---|
350 |
|
---|
351 | tstRTS3_SOURCES = tstRTS3.cpp
|
---|
352 |
|
---|
353 | tstSemMutex_SOURCES = tstSemMutex.cpp
|
---|
354 |
|
---|
355 | tstSemRW_SOURCES = tstSemRW.cpp
|
---|
356 |
|
---|
357 | tstSemPingPong_SOURCES = tstSemPingPong.cpp
|
---|
358 |
|
---|
359 | tstSems_SOURCES = tstSems.cpp
|
---|
360 |
|
---|
361 | tstRTStrCache_TEMPLATE = VBOXR3TSTEXE
|
---|
362 | tstRTStrCache_SOURCES = tstRTStrCache.cpp
|
---|
363 |
|
---|
364 | tstStrFormat_SOURCES = tstStrFormat.cpp
|
---|
365 |
|
---|
366 | tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
|
---|
367 |
|
---|
368 | tstStrToNum_SOURCES = tstStrToNum.cpp
|
---|
369 |
|
---|
370 | tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
|
---|
371 |
|
---|
372 | tstRTTemp_TEMPLATE = VBOXR3TSTEXE
|
---|
373 | tstRTTemp_SOURCES = tstRTTemp.cpp
|
---|
374 |
|
---|
375 | tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
|
---|
376 |
|
---|
377 | tstThread-1_SOURCES = tstThread-1.cpp
|
---|
378 |
|
---|
379 | tstTime_SOURCES = tstTime.cpp
|
---|
380 |
|
---|
381 | tstTime-2_SOURCES = tstTime-2.cpp
|
---|
382 |
|
---|
383 | tstTime-3_SOURCES = tstTime-3.cpp
|
---|
384 |
|
---|
385 | tstTime-4_SOURCES = tstTime-4.cpp
|
---|
386 |
|
---|
387 | tstTimer_SOURCES = tstTimer.cpp
|
---|
388 |
|
---|
389 | tstTimerLR_SOURCES = tstTimerLR.cpp
|
---|
390 |
|
---|
391 | tstTimeSpec_SOURCES = tstTimeSpec.cpp
|
---|
392 |
|
---|
393 | tstTSC_SOURCES = tstTSC.cpp
|
---|
394 | tstTSC_CXXFLAGS.linux += -O3
|
---|
395 |
|
---|
396 | tstUuid_SOURCES = tstUuid.cpp
|
---|
397 |
|
---|
398 | tstUtf8_SOURCES = tstUtf8.cpp
|
---|
399 |
|
---|
400 |
|
---|
401 | #
|
---|
402 | # odds and ends
|
---|
403 | #
|
---|
404 |
|
---|
405 | tstDarwinSched_SOURCES = tstDarwinSched.cpp
|
---|
406 |
|
---|
407 | ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
|
---|
408 | ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
409 |
|
---|
410 | endif # VBOX_WITH_TESTCASES
|
---|
411 |
|
---|
412 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
413 |
|
---|