VirtualBox

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

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

tstRTMemCache: Testcase + bug fixes. Works pretty well, but should try tune it a bit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.5 KB
Line 
1# $Id: Makefile.kmk 26419 2010-02-10 23:21:14Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT testcases.
4#
5
6#
7# Copyright (C) 2006-2009 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27# Clara, CA 95054 USA or visit http://www.sun.com if you need
28# additional information or have any questions.
29#
30
31SUB_DEPTH = ../../../..
32include $(KBUILD_PATH)/subheader.kmk
33
34ifdef VBOX_WITH_TESTCASES
35
36#
37# Globals
38#
39# WARNING: Careful with this wrt to the other sub-makefiles this joins.
40#
41TEMPLATE = VBOXR3TSTEXE
42
43# Defined by the parent makefile as well (for errmsgdata.h).
44IPRT_OUT_DIR ?= $(PATH_TARGET)/Runtime
45
46
47#
48# Target lists
49#
50PROGRAMS += \
51 tstRTAvl \
52 tstRTBase64 \
53 tstRTBitOperations \
54 tstRTCidr \
55 tstRTCritSect \
56 tstRTDigest \
57 tstDir \
58 tstDir-2 \
59 tstDir-3 \
60 tstEnv \
61 tstErrUnique \
62 tstFile \
63 tstFileAio \
64 tstFileAppend-1 \
65 tstFileLock \
66 tstFork \
67 tstGetOpt \
68 tstHandleTable \
69 tstRTHeapOffset \
70 tstRTHeapSimple \
71 tstInlineAsm \
72 tstLdr \
73 tstLdr-2 \
74 tstLdr-3 \
75 tstLdr-4 \
76 tstLdrLoad \
77 tstRTLockValidator \
78 tstLog \
79 tstMemAutoPtr \
80 tstRTMemCache \
81 tstRTMemPool \
82 tstRTR0MemUserKernelDriver \
83 tstMove \
84 tstMp-1 \
85 tstNoCrt-1 \
86 tstOnce \
87 tstRTPath \
88 tstPrfRT \
89 tstRand \
90 tstRTFsQueries \
91 tstR0ThreadPreemptionDriver \
92 tstRTS3 \
93 tstSemEvent \
94 tstSemMutex \
95 tstSemPingPong \
96 tstRTSemRW \
97 tstSems \
98 tstRTSemXRoads \
99 tstRTStrCache \
100 tstRTStrFormat \
101 tstStrSimplePattern \
102 tstStrToNum \
103 tstRTStrVersion \
104 tstSystemQueryOsInfo \
105 tstRTTemp \
106 tstTermCallbacks \
107 tstThread-1 \
108 tstTime \
109 tstTime-2 \
110 tstTime-3 \
111 tstTime-4 \
112 tstTimer \
113 tstTimerLR \
114 tstRTTimeSpec \
115 tstTSC \
116 tstUtf8 \
117 tstRTUuid
118# tstSems
119PROGRAMS.win += \
120 tstRTProcWait \
121 tstRTCritSectW32 \
122 tstFileAppendWin-1 \
123 ntGetTimerResolution
124PROGRAMS.linux += \
125 tstRTProcWait \
126 tstRTProcIsRunningByName \
127 tstRTBitOperationsPIC3 \
128 tstInlineAsmPIC \
129 tstInlineAsmPIC3
130PROGRAMS.l4 += \
131 tstIoCtl
132PROGRAMS.darwin += \
133 tstDarwinSched
134SYSMODS += \
135 tstLdrObjR0 \
136 tstRTR0MemUserKernel \
137 tstR0ThreadPreemption
138ifdef VBOX_WITH_RAW_MODE
139 SYSMODS += tstLdrObj
140endif
141if1of ($(VBOX_LDR_FMT)), lx pe)
142LIBRARIES += \
143 tstLdr-4Imp
144endif
145
146
147#
148# Target configs in almost alphabetical order.
149#
150
151tstRTAvl_TEMPLATE = VBOXR3TSTEXE
152tstRTAvl_SOURCES = tstRTAvl.cpp
153
154tstRTBase64_TEMPLATE = VBOXR3TSTEXE
155tstRTBase64_SOURCES = tstRTBase64.cpp
156
157tstRTBitOperations_TEMPLATE = VBOXR3TSTEXE
158tstRTBitOperations_SOURCES = tstRTBitOperations.cpp
159
160tstRTBitOperationsPIC3_TEMPLATE = VBOXR3TSTEXE
161tstRTBitOperationsPIC3_SOURCES = tstRTBitOperations.cpp
162tstRTBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
163tstRTBitOperationsPIC3_DEFS = PIC
164
165tstRTCidr_TEMPLATE = VBOXR3TSTEXE
166tstRTCidr_SOURCES = tstRTCidr.cpp
167
168tstRTCritSect_TEMPLATE = VBOXR3TSTEXE
169tstRTCritSect_SOURCES = tstRTCritSect.cpp
170
171tstRTCritSectW32_TEMPLATE = VBOXR3TSTEXE
172tstRTCritSectW32_SOURCES = tstRTCritSect.cpp
173tstRTCritSectW32_DEFS = TRY_WIN32_CRIT
174
175tstRTDigest_SOURCES = tstRTDigest.cpp
176
177tstDir_SOURCES = tstDir.cpp
178
179tstDir-2_SOURCES = tstDir-2.cpp
180
181tstDir-3_SOURCES = tstDir-3.cpp
182
183tstEnv_SOURCES = tstEnv.cpp
184
185# Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
186tstErrUnique_SOURCES = tstErrUnique.cpp
187tstErrUnique_INCS = $(IPRT_OUT_DIR)/
188tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
189
190tstFile_SOURCES = tstFile.cpp
191
192tstFileAppend-1_SOURCES = tstFileAppend-1.cpp
193
194tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
195
196tstFileAio_SOURCES = tstFileAio.cpp
197
198tstFileLock_SOURCES = tstFileLock.cpp
199
200tstFork_SOURCES = tstFork.cpp
201
202tstGetOpt_SOURCES = tstGetOpt.cpp
203
204tstHandleTable_SOURCES = tstHandleTable.cpp
205
206tstRTHeapOffset_TEMPLATE = VBOXR3TSTEXE
207tstRTHeapOffset_SOURCES = tstRTHeapOffset.cpp
208
209tstRTHeapSimple_TEMPLATE = VBOXR3TSTEXE
210tstRTHeapSimple_SOURCES = tstRTHeapSimple.cpp
211
212tstIoCtl_SOURCES = tstIoCtl.cpp
213
214tstInlineAsm_SOURCES = tstInlineAsm.cpp
215
216tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
217tstInlineAsmPIC_CXXFLAGS = -fPIC
218tstInlineAsmPIC_DEFS = PIC
219
220tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
221tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
222tstInlineAsmPIC3_DEFS = PIC
223
224tstLdr_SOURCES = tstLdr.cpp
225
226tstLdr-2_SOURCES = tstLdr-2.cpp
227tstLdr-2_DEFS = IN_DIS
228tstLdr-2_LIBS = \
229 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
230
231ifdef VBOX_WITH_RAW_MODE
232 tstLdrObj_TEMPLATE = VBoxRc
233 tstLdrObj_INST = $(INST_TESTCASE)
234 tstLdrObj_SYSSUFF = .gc
235 tstLdrObj_SOURCES = tstLdrObj.cpp
236 tstLdrObj_DEFS = IN_DIS IN_RT_RC DIS_CORE_ONLY
237 ifeq ($(VBOX_LDR_FMT32),elf)
238 tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
239 endif
240 tstLdrObj_LIBS = \
241 $(PATH_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
242 $(PATH_LIB)/RuntimeRC$(VBOX_SUFF_LIB)
243 ifeq ($(VBOX_LDR_FMT32),pe)
244 tstLdrObj_LDFLAGS = -Entry:Entrypoint
245 tstLdrObj_LIBS += \
246 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
247 endif # PE
248 ifeq ($(VBOX_LDR_FMT32),elf)
249 tstLdrObj_LDFLAGS = -e Entrypoint
250 endif
251 ifeq ($(VBOX_LDR_FMT32),lx)
252 tstLdrObj_LIBS += \
253 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
254 endif
255endif # VBOX_WITH_RAW_MODE
256
257tstLdr-3_SOURCES = tstLdr-3.cpp
258tstLdr-3_DEFS = IN_DIS
259tstLdr-3_LIBS = \
260 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
261
262tstLdr-4Imp_TEMPLATE = VBoxR0
263ifeq ($(VBOX_LDR_FMT),lx)
264 tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
265else ifeq ($(VBOX_LDR_FMT),pe)
266 tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
267endif
268
269tstLdrObjR0_TEMPLATE = VBoxR0
270tstLdrObjR0_INST = $(INST_TESTCASE)
271tstLdrObjR0_SYSSUFF = .r0
272tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
273tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
274ifeq ($(VBOX_LDR_FMT32),elf)
275 tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
276endif
277ifn1of ($(KBUILD_TARGET), win)
278 tstLdrObjR0_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
279endif
280tstLdrObjR0_LIBS = \
281 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
282 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
283ifeq ($(VBOX_LDR_FMT),pe)
284 tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
285 tstLdrObjR0_LIBS += \
286 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
287 $(TARGET_tstLdr-4Imp)
288endif
289ifeq ($(VBOX_LDR_FMT),elf)
290 tstLdrObjR0_LDFLAGS = -e Entrypoint
291endif
292ifeq ($(VBOX_LDR_FMT),lx)
293 tstLdrObjR0_LIBS += \
294 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
295 $(TARGET_tstLdr-4Imp)
296endif
297
298tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
299tstLdr-4_DEFS = IN_DIS
300tstLdr-4_LIBS = \
301 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
302
303tstLdrLoad_SOURCES = tstLdrLoad.cpp
304
305tstRTLockValidator_TEMPLATE = VBOXR3TSTEXE
306tstRTLockValidator_SOURCES = tstRTLockValidator.cpp
307
308tstLog_SOURCES = tstLog.cpp
309
310tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
311
312tstRTMemCache_TEMPLATE = VBOXR3TSTEXE
313tstRTMemCache_SOURCES = tstRTMemCache.cpp
314
315tstRTMemPool_TEMPLATE = VBOXR3TSTEXE
316tstRTMemPool_SOURCES = tstRTMemPool.cpp
317
318tstRTR0MemUserKernel_TEMPLATE = VBoxR0
319tstRTR0MemUserKernel_INST = $(INST_TESTCASE)
320tstRTR0MemUserKernel_DEFS = IN_RT_R0
321tstRTR0MemUserKernel_SYSSUFF = .r0
322tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp
323tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
324if1of ($(VBOX_LDR_FMT), pe lx)
325 tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
326endif
327
328tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.cpp
329
330tstMove_SOURCES = tstMove.cpp
331
332tstMp-1_SOURCES = tstMp-1.cpp
333
334tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
335tstNoCrt-1_SOURCES = \
336 tstNoCrt-1.cpp \
337 ../common/string/memcpy.asm \
338 ../common/string/mempcpy.asm \
339 ../common/string/memmove.asm \
340 ../common/string/memset.asm \
341 ../common/string/memchr.asm \
342 ../common/string/memcmp.asm \
343 ../common/string/strchr.asm \
344 ../common/string/strcmp.asm \
345 ../common/string/strcpy.asm \
346 ../common/string/strlen.asm
347
348tstOnce_SOURCES = tstOnce.cpp
349
350tstRTPath_TEMPLATE = VBOXR3TSTEXE
351tstRTPath_SOURCES = tstRTPath.cpp
352
353tstPrfRT_SOURCES = tstPrfRT.cpp
354
355tstRand_SOURCES = tstRand.cpp
356
357tstR0ThreadPreemption_TEMPLATE = VBoxR0
358tstR0ThreadPreemption_INST = $(INST_TESTCASE)
359tstR0ThreadPreemption_DEFS = IN_RT_R0
360tstR0ThreadPreemption_SYSSUFF = .r0
361tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
362tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
363if1of ($(VBOX_LDR_FMT), pe lx)
364 tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
365endif
366
367tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
368
369tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
370
371tstRTProcWait_SOURCES = tstRTProcWait.cpp
372
373tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
374
375tstRTS3_SOURCES = tstRTS3.cpp
376
377tstSemMutex_SOURCES = tstSemMutex.cpp
378
379tstSemEvent_SOURCES = tstSemEvent.cpp
380
381tstRTSemRW_TEMPLATE = VBOXR3TSTEXE
382tstRTSemRW_SOURCES = tstRTSemRW.cpp
383
384tstSemPingPong_SOURCES = tstSemPingPong.cpp
385
386tstSems_SOURCES = tstSems.cpp
387
388tstRTSemXRoads_TEMPLATE = VBOXR3TSTEXE
389tstRTSemXRoads_SOURCES = tstRTSemXRoads.cpp
390
391tstRTStrCache_TEMPLATE = VBOXR3TSTEXE
392tstRTStrCache_SOURCES = tstRTStrCache.cpp
393
394tstRTStrFormat_SOURCES = tstRTStrFormat.cpp
395
396tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
397
398tstStrToNum_SOURCES = tstStrToNum.cpp
399
400tstRTStrVersion_TEMPLATE = VBOXR3TSTEXE
401tstRTStrVersion_SOURCES = tstRTStrVersion.cpp
402
403tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
404
405tstRTTemp_TEMPLATE = VBOXR3TSTEXE
406tstRTTemp_SOURCES = tstRTTemp.cpp
407
408tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
409
410tstThread-1_SOURCES = tstThread-1.cpp
411
412tstTime_SOURCES = tstTime.cpp
413
414tstTime-2_SOURCES = tstTime-2.cpp
415
416tstTime-3_SOURCES = tstTime-3.cpp
417
418tstTime-4_SOURCES = tstTime-4.cpp
419
420tstTimer_SOURCES = tstTimer.cpp
421
422tstTimerLR_SOURCES = tstTimerLR.cpp
423
424tstRTTimeSpec_TEMPLATE = VBOXR3TSTEXE
425tstRTTimeSpec_SOURCES = tstRTTimeSpec.cpp
426
427tstTSC_SOURCES = tstTSC.cpp
428tstTSC_CXXFLAGS.linux += -O3
429
430tstRTUuid_TEMPLATE = VBOXR3TSTEXE
431tstRTUuid_SOURCES = tstRTUuid.cpp
432
433tstUtf8_SOURCES = tstUtf8.cpp
434
435
436#
437# odds and ends
438#
439
440tstDarwinSched_SOURCES = tstDarwinSched.cpp
441
442ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
443ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
444
445endif # VBOX_WITH_TESTCASES
446
447include $(KBUILD_PATH)/subfooter.kmk
448
Note: See TracBrowser for help on using the repository browser.

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