VirtualBox

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

Last change on this file since 31453 was 31375, checked in by vboxsync, 14 years ago

gcc-4.4 workaround

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