VirtualBox

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

Last change on this file since 32315 was 31787, checked in by vboxsync, 14 years ago

tstRTCoreDump: enable building.

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