VirtualBox

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

Last change on this file since 32619 was 32611, checked in by vboxsync, 14 years ago

tstRTR0Timer: Started on a timer testcase for ring-0.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 12.9 KB
Line 
1# $Id: Makefile.kmk 32611 2010-09-17 15:15:22Z 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 tstInlineAsmPIC \
127 tstInlineAsmPIC3
128PROGRAMS.solaris += \
129 tstRTCoreDump
130PROGRAMS.l4 += \
131 tstIoCtl
132PROGRAMS.darwin += \
133 tstDarwinSched
134ifdef VBOX_WITH_LIBCURL
135 PROGRAMS += \
136 tstRTS3
137endif
138if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
139 PROGRAMS += \
140 tstLdr-2 \
141 tstLdr-3 \
142 tstLdr-4 \
143 tstNoCrt-1 \
144 tstRTR0MemUserKernelDriver \
145 tstRTR0SemMutexDriver \
146 tstRTR0TimerDriver \
147 tstR0ThreadPreemptionDriver \
148 tstTSC
149 SYSMODS += \
150 tstLdrObjR0 \
151 tstRTR0MemUserKernel \
152 tstRTR0SemMutex \
153 tstRTR0Timer \
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
350tstMove_SOURCES = tstMove.cpp
351
352tstMp-1_SOURCES = tstMp-1.cpp
353
354tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
355tstNoCrt-1_SOURCES = \
356 tstNoCrt-1.cpp \
357 ../common/string/memcpy.asm \
358 ../common/string/mempcpy.asm \
359 ../common/string/memmove.asm \
360 ../common/string/memset.asm \
361 ../common/string/memchr.asm \
362 ../common/string/memcmp.asm \
363 ../common/string/strchr.asm \
364 ../common/string/strcmp.asm \
365 ../common/string/strcpy.asm \
366 ../common/string/strlen.asm
367
368tstOnce_SOURCES = tstOnce.cpp
369
370tstRTPath_TEMPLATE = VBOXR3TSTEXE
371tstRTPath_SOURCES = tstRTPath.cpp
372
373tstRTPipe_TEMPLATE = VBOXR3TSTEXE
374tstRTPipe_SOURCES = tstRTPipe.cpp
375
376tstRTPoll_TEMPLATE = VBOXR3TSTEXE
377tstRTPoll_SOURCES = tstRTPoll.cpp
378
379tstPrfRT_SOURCES = tstPrfRT.cpp
380
381tstRand_SOURCES = tstRand.cpp
382
383tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
384
385tstRTProcCreateEx_TEMPLATE = VBOXR3TSTEXE
386tstRTProcCreateEx_SOURCES = tstRTProcCreateEx.cpp
387
388tstRTProcWait_SOURCES = tstRTProcWait.cpp
389
390tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
391
392tstRTS3_SOURCES = tstRTS3.cpp
393
394tstSemMutex_SOURCES = tstSemMutex.cpp
395
396tstSemEvent_SOURCES = tstSemEvent.cpp
397
398tstRTSemRW_TEMPLATE = VBOXR3TSTEXE
399tstRTSemRW_SOURCES = tstRTSemRW.cpp
400
401tstSemPingPong_SOURCES = tstSemPingPong.cpp
402
403tstSems_SOURCES = tstSems.cpp
404
405tstRTSemXRoads_TEMPLATE = VBOXR3TSTEXE
406tstRTSemXRoads_SOURCES = tstRTSemXRoads.cpp
407
408tstRTSort_TEMPLATE = VBOXR3TSTEXE
409tstRTSort_SOURCES = tstRTSort.cpp
410
411tstRTStrAlloc_TEMPLATE = VBOXR3TSTEXE
412tstRTStrAlloc_SOURCES = tstRTStrAlloc.cpp
413
414tstRTStrCache_TEMPLATE = VBOXR3TSTEXE
415tstRTStrCache_SOURCES = tstRTStrCache.cpp
416
417tstRTStrFormat_SOURCES = tstRTStrFormat.cpp
418
419tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
420
421tstStrToNum_SOURCES = tstStrToNum.cpp
422
423tstRTStrVersion_TEMPLATE = VBOXR3TSTEXE
424tstRTStrVersion_SOURCES = tstRTStrVersion.cpp
425
426tstRTSystemQueryDmi_TEMPLATE = VBOXR3TSTEXE
427tstRTSystemQueryDmi_SOURCES = tstRTSystemQueryDmi.cpp
428
429tstRTSystemQueryOsInfo_TEMPLATE = VBOXR3TSTEXE
430tstRTSystemQueryOsInfo_SOURCES = tstRTSystemQueryOsInfo.cpp
431
432tstRTTemp_TEMPLATE = VBOXR3TSTEXE
433tstRTTemp_SOURCES = tstRTTemp.cpp
434
435tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
436
437tstThread-1_SOURCES = tstThread-1.cpp
438
439tstTime_SOURCES = tstTime.cpp
440
441tstTime-2_SOURCES = tstTime-2.cpp
442
443tstTime-3_SOURCES = tstTime-3.cpp
444
445tstTime-4_SOURCES = tstTime-4.cpp
446
447tstTimer_SOURCES = tstTimer.cpp
448
449tstTimerLR_SOURCES = tstTimerLR.cpp
450
451tstRTTimeSpec_TEMPLATE = VBOXR3TSTEXE
452tstRTTimeSpec_SOURCES = tstRTTimeSpec.cpp
453
454tstTSC_SOURCES = tstTSC.cpp
455tstTSC_CXXFLAGS.linux += -O3
456
457tstRTUuid_TEMPLATE = VBOXR3TSTEXE
458tstRTUuid_SOURCES = tstRTUuid.cpp
459
460tstUtf8_SOURCES = tstUtf8.cpp
461
462tstRTCoreDump_TEMPLACE = VBOXR3TSTEXE
463tstRTCoreDump_SOURCES = tstRTCoreDump.cpp
464
465
466#
467# Ring-0 testcases.
468#
469
470## @todo create a template for compiling the ring-0 part.
471tstRTR0MemUserKernel_TEMPLATE = VBoxR0
472tstRTR0MemUserKernel_INST = $(INST_TESTCASE)
473tstRTR0MemUserKernel_DEFS = IN_RT_R0
474tstRTR0MemUserKernel_SYSSUFF = .r0
475tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp
476tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
477if1of ($(VBOX_LDR_FMT), pe lx)
478 tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
479endif
480tstRTR0MemUserKernelDriver_TEMPLATE = VBOXR3TSTEXE
481tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.cpp
482
483
484tstRTR0SemMutex_TEMPLATE = VBoxR0
485tstRTR0SemMutex_INST = $(INST_TESTCASE)
486tstRTR0SemMutex_DEFS = IN_RT_R0
487tstRTR0SemMutex_SYSSUFF = .r0
488tstRTR0SemMutex_SOURCES = tstRTR0SemMutex.cpp
489tstRTR0SemMutex_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
490if1of ($(VBOX_LDR_FMT), pe lx)
491 tstRTR0SemMutex_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
492endif
493tstRTR0SemMutexDriver_TEMPLATE = VBOXR3TSTEXE
494tstRTR0SemMutexDriver_SOURCES = tstRTR0SemMutexDriver.cpp
495
496
497tstRTR0Timer_TEMPLATE = VBoxR0
498tstRTR0Timer_INST = $(INST_TESTCASE)
499tstRTR0Timer_DEFS = IN_RT_R0
500tstRTR0Timer_SYSSUFF = .r0
501tstRTR0Timer_SOURCES = tstRTR0Timer.cpp
502tstRTR0Timer_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
503if1of ($(VBOX_LDR_FMT), pe lx)
504 tstRTR0Timer_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
505endif
506tstRTR0TimerDriver_TEMPLATE = VBOXR3TSTEXE
507tstRTR0TimerDriver_SOURCES = tstRTR0TimerDriver.cpp
508
509
510tstR0ThreadPreemption_TEMPLATE = VBoxR0
511tstR0ThreadPreemption_INST = $(INST_TESTCASE)
512tstR0ThreadPreemption_DEFS = IN_RT_R0
513tstR0ThreadPreemption_SYSSUFF = .r0
514tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
515tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
516if1of ($(VBOX_LDR_FMT), pe lx)
517 tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
518endif
519tstR0ThreadPreemptionDriver_TEMPLATE = VBOXR3TSTEXE
520tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
521
522
523#
524# Odds and ends.
525#
526
527tstDarwinSched_SOURCES = tstDarwinSched.cpp
528
529ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
530ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
531
532endif # VBOX_WITH_TESTCASES
533
534
535#
536# Various useful tools
537#
538
539# RTLdrFlt is similar to c++filt, except that it's for VMMR0.r0 stacks.
540PROGRAMS += RTLdrFlt
541RTLdrFlt_TEMPLATE = VBOXR3TSTEXE
542RTLdrFlt_SOURCES = RTLdrFlt.cpp
543
544
545
546include $(KBUILD_PATH)/subfooter.kmk
547
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