VirtualBox

source: vbox/trunk/src/VBox/Runtime/testcase/Makefile.kmk@ 31370

Last change on this file since 31370 was 31370, checked in by vboxsync, 15 years ago

Main: cleanup machine renames, remove dead code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 12.3 KB
Line 
1# $Id: Makefile.kmk 31370 2010-08-04 18:49:09Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT testcases.
4#
5
6#
7# Copyright (C) 2006-2010 Oracle Corporation
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
27SUB_DEPTH = ../../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30ifdef VBOX_WITH_TESTCASES
31
32#
33# Globals
34#
35# WARNING: Careful with this wrt to the other sub-makefiles this joins.
36#
37TEMPLATE = VBOXR3TSTEXE
38
39# Defined by the parent makefile as well (for errmsgdata.h).
40IPRT_OUT_DIR ?= $(PATH_TARGET)/Runtime
41
42
43#
44# Target lists
45#
46PROGRAMS += \
47 tstRTAssertCompile \
48 tstRTAvl \
49 tstRTBase64 \
50 tstRTBitOperations \
51 tstRTCidr \
52 tstRTCritSect \
53 tstRTDigest \
54 tstDir \
55 tstDir-2 \
56 tstDir-3 \
57 tstEnv \
58 tstErrUnique \
59 tstFile \
60 tstRTFileAio \
61 tstRTFileAppend-1 \
62 tstFileLock \
63 tstFork \
64 tstRTGetOpt \
65 tstRTGetOptArgv \
66 tstHandleTable \
67 tstRTHeapOffset \
68 tstRTHeapSimple \
69 tstInlineAsm \
70 tstLdr \
71 tstLdrLoad \
72 tstRTList \
73 tstRTLockValidator \
74 tstLog \
75 tstMemAutoPtr \
76 tstRTMemEf \
77 tstRTMemCache \
78 tstRTMemPool \
79 tstMove \
80 tstMp-1 \
81 tstOnce \
82 tstRTPath \
83 tstRTPipe \
84 tstRTPoll \
85 tstRTProcCreateEx \
86 tstPrfRT \
87 tstRand \
88 tstRTFsQueries \
89 tstSemEvent \
90 tstSemMutex \
91 tstSemPingPong \
92 tstRTSemRW \
93 tstSems \
94 tstRTSemXRoads \
95 tstRTSort \
96 tstRTStrAlloc \
97 tstRTStrCache \
98 tstRTStrFormat \
99 tstStrSimplePattern \
100 tstStrToNum \
101 tstRTStrVersion \
102 tstRTSystemQueryDmi \
103 tstRTSystemQueryOsInfo \
104 tstRTTemp \
105 tstTermCallbacks \
106 tstThread-1 \
107 tstTime \
108 tstTime-2 \
109 tstTime-3 \
110 tstTime-4 \
111 tstTimer \
112 tstTimerLR \
113 tstRTTimeSpec \
114 tstUtf8 \
115 tstRTUuid
116# tstSems
117PROGRAMS.win += \
118 tstRTProcWait \
119 tstRTCritSectW32 \
120 tstFileAppendWin-1 \
121 ntGetTimerResolution
122PROGRAMS.linux += \
123 tstRTProcWait \
124 tstRTProcIsRunningByName \
125 tstRTBitOperationsPIC3 \
126 tstInlineAsmPIC3
127if1of ($(USERNAME), umoeller)
128else
129PROGRAMS.linux += \
130 tstInlineAsmPIC
131endif
132PROGRAMS.l4 += \
133 tstIoCtl
134PROGRAMS.darwin += \
135 tstDarwinSched
136ifdef VBOX_WITH_LIBCURL
137 PROGRAMS += \
138 tstRTS3
139endif
140if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
141 PROGRAMS += \
142 tstLdr-2 \
143 tstLdr-3 \
144 tstLdr-4 \
145 tstNoCrt-1 \
146 tstRTR0MemUserKernelDriver \
147 tstRTR0SemMutexDriver \
148 tstR0ThreadPreemptionDriver \
149 tstTSC
150 SYSMODS += \
151 tstLdrObjR0 \
152 tstRTR0MemUserKernel \
153 tstRTR0SemMutex \
154 tstR0ThreadPreemption
155 ifdef VBOX_WITH_RAW_MODE
156 SYSMODS += tstLdrObj
157 endif
158endif
159if1of ($(VBOX_LDR_FMT)), lx pe)
160 LIBRARIES += \
161 tstLdr-4Imp
162endif
163
164
165#
166# Target configs in almost alphabetical order.
167#
168
169tstRTAssertCompile_TEMPLATE = VBOXR3TSTEXE
170tstRTAssertCompile_NOINST = true
171tstRTAssertCompile_SOURCES = tstRTAssertCompile.cpp
172
173tstRTAvl_TEMPLATE = VBOXR3TSTEXE
174tstRTAvl_SOURCES = tstRTAvl.cpp
175
176tstRTBase64_TEMPLATE = VBOXR3TSTEXE
177tstRTBase64_SOURCES = tstRTBase64.cpp
178
179tstRTBitOperations_TEMPLATE = VBOXR3TSTEXE
180tstRTBitOperations_SOURCES = tstRTBitOperations.cpp
181
182tstRTBitOperationsPIC3_TEMPLATE = VBOXR3TSTEXE
183tstRTBitOperationsPIC3_SOURCES = tstRTBitOperations.cpp
184tstRTBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
185tstRTBitOperationsPIC3_DEFS = PIC
186
187tstRTCidr_TEMPLATE = VBOXR3TSTEXE
188tstRTCidr_SOURCES = tstRTCidr.cpp
189
190tstRTCritSect_TEMPLATE = VBOXR3TSTEXE
191tstRTCritSect_SOURCES = tstRTCritSect.cpp
192
193tstRTCritSectW32_TEMPLATE = VBOXR3TSTEXE
194tstRTCritSectW32_SOURCES = tstRTCritSect.cpp
195tstRTCritSectW32_DEFS = TRY_WIN32_CRIT
196
197tstRTDigest_SOURCES = tstRTDigest.cpp
198
199tstDir_SOURCES = tstDir.cpp
200
201tstDir-2_SOURCES = tstDir-2.cpp
202
203tstDir-3_SOURCES = tstDir-3.cpp
204
205tstEnv_SOURCES = tstEnv.cpp
206
207# Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
208tstErrUnique_SOURCES = tstErrUnique.cpp
209tstErrUnique_INCS = $(IPRT_OUT_DIR)/
210tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
211
212tstFile_SOURCES = tstFile.cpp
213
214tstRTFileAio_SOURCES = VBOXR3TSTEXE
215tstRTFileAio_SOURCES = tstRTFileAio.cpp
216
217tstRTFileAppend-1_TEMPLATE = VBOXR3TSTEXE
218tstRTFileAppend-1_SOURCES = tstRTFileAppend-1.cpp
219
220tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
221
222tstFileLock_SOURCES = tstFileLock.cpp
223
224tstFork_SOURCES = tstFork.cpp
225
226tstRTGetOpt_TEMPLATE = VBOXR3TSTEXE
227tstRTGetOpt_SOURCES = tstRTGetOpt.cpp
228
229tstRTGetOptArgv_TEMPLATE = VBOXR3TSTEXE
230tstRTGetOptArgv_SOURCES = tstRTGetOptArgv.cpp
231
232tstHandleTable_SOURCES = tstHandleTable.cpp
233
234tstRTHeapOffset_TEMPLATE = VBOXR3TSTEXE
235tstRTHeapOffset_SOURCES = tstRTHeapOffset.cpp
236
237tstRTHeapSimple_TEMPLATE = VBOXR3TSTEXE
238tstRTHeapSimple_SOURCES = tstRTHeapSimple.cpp
239
240tstIoCtl_SOURCES = tstIoCtl.cpp
241
242tstInlineAsm_SOURCES = tstInlineAsm.cpp
243
244tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
245tstInlineAsmPIC_CXXFLAGS = -fPIC
246tstInlineAsmPIC_DEFS = PIC
247
248tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
249tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
250tstInlineAsmPIC3_DEFS = PIC
251
252tstLdr_SOURCES = tstLdr.cpp
253
254tstLdr-2_SOURCES = tstLdr-2.cpp
255tstLdr-2_DEFS = IN_DIS
256tstLdr-2_LIBS = \
257 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
258
259ifdef VBOX_WITH_RAW_MODE
260 tstLdrObj_TEMPLATE = VBoxRc
261 tstLdrObj_INST = $(INST_TESTCASE)
262 tstLdrObj_SYSSUFF = .gc
263 tstLdrObj_SOURCES = tstLdrObj.cpp
264 tstLdrObj_DEFS = IN_DIS IN_RT_RC DIS_CORE_ONLY
265 ifeq ($(VBOX_LDR_FMT32),elf)
266 tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
267 endif
268 tstLdrObj_LIBS = \
269 $(PATH_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
270 $(PATH_LIB)/RuntimeRC$(VBOX_SUFF_LIB)
271 ifeq ($(VBOX_LDR_FMT32),pe)
272 tstLdrObj_LIBS += \
273 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
274 endif # PE
275 ifeq ($(VBOX_LDR_FMT32),elf)
276 tstLdrObj_LDFLAGS = -e Entrypoint
277 endif
278 ifeq ($(VBOX_LDR_FMT32),lx)
279 tstLdrObj_LIBS += \
280 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
281 endif
282endif # VBOX_WITH_RAW_MODE
283
284tstLdr-3_SOURCES = tstLdr-3.cpp
285tstLdr-3_DEFS = IN_DIS
286tstLdr-3_LIBS = \
287 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
288
289tstLdr-4Imp_TEMPLATE = VBoxR0
290ifeq ($(VBOX_LDR_FMT),lx)
291 tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
292else ifeq ($(VBOX_LDR_FMT),pe)
293 tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
294endif
295
296tstLdrObjR0_TEMPLATE = VBoxR0
297tstLdrObjR0_INST = $(INST_TESTCASE)
298tstLdrObjR0_SYSSUFF = .r0
299tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
300tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
301ifeq ($(VBOX_LDR_FMT32),elf)
302 tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
303endif
304ifn1of ($(KBUILD_TARGET), win)
305 tstLdrObjR0_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
306endif
307tstLdrObjR0_LIBS = \
308 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
309 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
310ifeq ($(VBOX_LDR_FMT),pe)
311 tstLdrObjR0_LIBS += \
312 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
313 $(TARGET_tstLdr-4Imp)
314endif
315ifeq ($(VBOX_LDR_FMT),elf)
316 tstLdrObjR0_LDFLAGS = -e Entrypoint
317endif
318ifeq ($(VBOX_LDR_FMT),lx)
319 tstLdrObjR0_LIBS += \
320 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
321 $(TARGET_tstLdr-4Imp)
322endif
323
324tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
325tstLdr-4_DEFS = IN_DIS
326tstLdr-4_LIBS = \
327 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
328
329tstLdrLoad_SOURCES = tstLdrLoad.cpp
330
331tstRTList_TEMPLATE = VBOXR3TSTEXE
332tstRTList_SOURCES = tstRTList.cpp
333
334tstRTLockValidator_TEMPLATE = VBOXR3TSTEXE
335tstRTLockValidator_SOURCES = tstRTLockValidator.cpp
336
337tstLog_SOURCES = tstLog.cpp
338
339tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
340
341tstRTMemEf_TEMPLATE = VBOXR3TSTEXE
342tstRTMemEf_SOURCES = tstRTMemEf.cpp
343
344tstRTMemCache_TEMPLATE = VBOXR3TSTEXE
345tstRTMemCache_SOURCES = tstRTMemCache.cpp
346
347tstRTMemPool_TEMPLATE = VBOXR3TSTEXE
348tstRTMemPool_SOURCES = tstRTMemPool.cpp
349
350tstRTR0MemUserKernel_TEMPLATE = VBoxR0
351tstRTR0MemUserKernel_INST = $(INST_TESTCASE)
352tstRTR0MemUserKernel_DEFS = IN_RT_R0
353tstRTR0MemUserKernel_SYSSUFF = .r0
354tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp
355tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
356if1of ($(VBOX_LDR_FMT), pe lx)
357 tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
358endif
359
360tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.cpp
361
362tstMove_SOURCES = tstMove.cpp
363
364tstMp-1_SOURCES = tstMp-1.cpp
365
366tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
367tstNoCrt-1_SOURCES = \
368 tstNoCrt-1.cpp \
369 ../common/string/memcpy.asm \
370 ../common/string/mempcpy.asm \
371 ../common/string/memmove.asm \
372 ../common/string/memset.asm \
373 ../common/string/memchr.asm \
374 ../common/string/memcmp.asm \
375 ../common/string/strchr.asm \
376 ../common/string/strcmp.asm \
377 ../common/string/strcpy.asm \
378 ../common/string/strlen.asm
379
380tstOnce_SOURCES = tstOnce.cpp
381
382tstRTPath_TEMPLATE = VBOXR3TSTEXE
383tstRTPath_SOURCES = tstRTPath.cpp
384
385tstRTPipe_TEMPLATE = VBOXR3TSTEXE
386tstRTPipe_SOURCES = tstRTPipe.cpp
387
388tstRTPoll_TEMPLATE = VBOXR3TSTEXE
389tstRTPoll_SOURCES = tstRTPoll.cpp
390
391tstPrfRT_SOURCES = tstPrfRT.cpp
392
393tstRand_SOURCES = tstRand.cpp
394
395tstR0ThreadPreemption_TEMPLATE = VBoxR0
396tstR0ThreadPreemption_INST = $(INST_TESTCASE)
397tstR0ThreadPreemption_DEFS = IN_RT_R0
398tstR0ThreadPreemption_SYSSUFF = .r0
399tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
400tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
401if1of ($(VBOX_LDR_FMT), pe lx)
402 tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
403endif
404
405tstR0ThreadPreemptionDriver_TEMPLATE = VBOXR3TSTEXE
406tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
407
408tstRTR0SemMutex_TEMPLATE = VBoxR0
409tstRTR0SemMutex_INST = $(INST_TESTCASE)
410tstRTR0SemMutex_DEFS = IN_RT_R0
411tstRTR0SemMutex_SYSSUFF = .r0
412tstRTR0SemMutex_SOURCES = tstRTR0SemMutex.cpp
413tstRTR0SemMutex_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
414if1of ($(VBOX_LDR_FMT), pe lx)
415 tstRTR0SemMutex_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
416endif
417
418tstRTR0SemMutexDriver_TEMPLATE = VBOXR3TSTEXE
419tstRTR0SemMutexDriver_SOURCES = tstRTR0SemMutexDriver.cpp
420
421tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
422
423tstRTProcCreateEx_TEMPLATE = VBOXR3TSTEXE
424tstRTProcCreateEx_SOURCES = tstRTProcCreateEx.cpp
425
426tstRTProcWait_SOURCES = tstRTProcWait.cpp
427
428tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
429
430tstRTS3_SOURCES = tstRTS3.cpp
431
432tstSemMutex_SOURCES = tstSemMutex.cpp
433
434tstSemEvent_SOURCES = tstSemEvent.cpp
435
436tstRTSemRW_TEMPLATE = VBOXR3TSTEXE
437tstRTSemRW_SOURCES = tstRTSemRW.cpp
438
439tstSemPingPong_SOURCES = tstSemPingPong.cpp
440
441tstSems_SOURCES = tstSems.cpp
442
443tstRTSemXRoads_TEMPLATE = VBOXR3TSTEXE
444tstRTSemXRoads_SOURCES = tstRTSemXRoads.cpp
445
446tstRTSort_TEMPLATE = VBOXR3TSTEXE
447tstRTSort_SOURCES = tstRTSort.cpp
448
449tstRTStrAlloc_TEMPLATE = VBOXR3TSTEXE
450tstRTStrAlloc_SOURCES = tstRTStrAlloc.cpp
451
452tstRTStrCache_TEMPLATE = VBOXR3TSTEXE
453tstRTStrCache_SOURCES = tstRTStrCache.cpp
454
455tstRTStrFormat_SOURCES = tstRTStrFormat.cpp
456
457tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
458
459tstStrToNum_SOURCES = tstStrToNum.cpp
460
461tstRTStrVersion_TEMPLATE = VBOXR3TSTEXE
462tstRTStrVersion_SOURCES = tstRTStrVersion.cpp
463
464tstRTSystemQueryDmi_TEMPLATE = VBOXR3TSTEXE
465tstRTSystemQueryDmi_SOURCES = tstRTSystemQueryDmi.cpp
466
467tstRTSystemQueryOsInfo_TEMPLATE = VBOXR3TSTEXE
468tstRTSystemQueryOsInfo_SOURCES = tstRTSystemQueryOsInfo.cpp
469
470tstRTTemp_TEMPLATE = VBOXR3TSTEXE
471tstRTTemp_SOURCES = tstRTTemp.cpp
472
473tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
474
475tstThread-1_SOURCES = tstThread-1.cpp
476
477tstTime_SOURCES = tstTime.cpp
478
479tstTime-2_SOURCES = tstTime-2.cpp
480
481tstTime-3_SOURCES = tstTime-3.cpp
482
483tstTime-4_SOURCES = tstTime-4.cpp
484
485tstTimer_SOURCES = tstTimer.cpp
486
487tstTimerLR_SOURCES = tstTimerLR.cpp
488
489tstRTTimeSpec_TEMPLATE = VBOXR3TSTEXE
490tstRTTimeSpec_SOURCES = tstRTTimeSpec.cpp
491
492tstTSC_SOURCES = tstTSC.cpp
493tstTSC_CXXFLAGS.linux += -O3
494
495tstRTUuid_TEMPLATE = VBOXR3TSTEXE
496tstRTUuid_SOURCES = tstRTUuid.cpp
497
498tstUtf8_SOURCES = tstUtf8.cpp
499
500#
501# odds and ends
502#
503
504tstDarwinSched_SOURCES = tstDarwinSched.cpp
505
506ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
507ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
508
509endif # VBOX_WITH_TESTCASES
510
511
512#
513# Various useful tools
514#
515
516# RTLdrFlt is similar to c++filt, except that it's for VMMR0.r0 stacks.
517PROGRAMS += RTLdrFlt
518RTLdrFlt_TEMPLATE = VBOXR3TSTEXE
519RTLdrFlt_SOURCES = RTLdrFlt.cpp
520
521
522
523include $(KBUILD_PATH)/subfooter.kmk
524
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette