VirtualBox

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

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

iprt: tstRTFile*.

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