VirtualBox

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

Last change on this file since 21037 was 20647, checked in by vboxsync, 16 years ago

IPRT: Added simple testcase for the RTStrCache API (just to smoke it out).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.0 KB
Line 
1# $Id: Makefile.kmk 20647 2009-06-16 21:58:09Z 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 tstDeadlock \
57 tstDir \
58 tstDir-2 \
59 tstDir-3 \
60 tstEnv \
61 tstErrUnique \
62 tstFile \
63 tstFileLock \
64 tstFork \
65 tstGetOpt \
66 tstHandleTable \
67 tstHeapSimple \
68 tstInlineAsm \
69 tstLdr \
70 tstLdr-2 \
71 tstLdr-3 \
72 tstLdr-4 \
73 tstLdrLoad \
74 tstLog \
75 tstMemAutoPtr \
76 tstRTMemPool \
77 tstMove \
78 tstMp-1 \
79 tstNoCrt-1 \
80 tstOnce \
81 tstPath \
82 tstPrfRT \
83 tstRand \
84 tstRTFsQueries \
85 tstR0ThreadPreemptionDriver \
86 tstSems \
87 tstSemPingPong \
88 tstRTStrCache \
89 tstStrFormat \
90 tstStrSimplePattern \
91 tstStrToNum \
92 tstSystemQueryOsInfo \
93 tstRTTemp \
94 tstTermCallbacks \
95 tstThread-1 \
96 tstTime \
97 tstTime-2 \
98 tstTime-3 \
99 tstTime-4 \
100 tstTimer \
101 tstTimerLR \
102 tstTimeSpec \
103 tstTSC \
104 tstUtf8 \
105 tstUuid
106# tstSems
107PROGRAMS.win += \
108 tstRTProcWait \
109 tstRTCritSectW32 \
110 tstFileAppendWin-1 \
111 ntGetTimerResolution
112PROGRAMS.linux += \
113 tstRTProcWait \
114 tstRTProcIsRunningByName \
115 tstRTBitOperationsPIC3 \
116 tstInlineAsmPIC \
117 tstInlineAsmPIC3 \
118 tstSemMutex \
119 tstSemRW
120PROGRAMS.l4 += \
121 tstIoCtl
122PROGRAMS.darwin += \
123 tstDarwinSched
124SYSMODS += \
125 tstLdrObj \
126 tstLdrObjR0 \
127 tstR0ThreadPreemption
128if1of ($(VBOX_LDR_FMT)), lx pe)
129LIBRARIES += \
130 tstLdr-4Imp
131endif
132ifdef RT_ASYNC_IO_CODE
133PROGRAMS += \
134 tstFileAio
135endif
136
137if defined(VBOX_WITH_LIBXML2_IN_VBOXRT)
138PROGRAMS += \
139 tstRTS3
140endif
141
142
143#
144# Target configs in almost alphabetical order.
145#
146
147tstRTAvl_TEMPLATE = VBOXR3TSTEXE
148tstRTAvl_SOURCES = tstRTAvl.cpp
149
150tstRTBase64_TEMPLATE = VBOXR3TSTEXE
151tstRTBase64_SOURCES = tstRTBase64.cpp
152
153tstRTBitOperations_TEMPLATE = VBOXR3TSTEXE
154tstRTBitOperations_SOURCES = tstRTBitOperations.cpp
155
156tstRTBitOperationsPIC3_TEMPLATE = VBOXR3TSTEXE
157tstRTBitOperationsPIC3_SOURCES = tstRTBitOperations.cpp
158tstRTBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
159tstRTBitOperationsPIC3_DEFS = PIC
160
161tstRTCidr_TEMPLATE = VBOXR3TSTEXE
162tstRTCidr_SOURCES = tstRTCidr.cpp
163
164tstRTCritSect_TEMPLATE = VBOXR3TSTEXE
165tstRTCritSect_SOURCES = tstRTCritSect.cpp
166
167tstRTCritSectW32_TEMPLATE = VBOXR3TSTEXE
168tstRTCritSectW32_SOURCES = tstRTCritSect.cpp
169tstRTCritSectW32_DEFS = TRY_WIN32_CRIT
170
171tstDeadlock_SOURCES = tstDeadlock.cpp
172
173tstDir_SOURCES = tstDir.cpp
174
175tstDir-2_SOURCES = tstDir-2.cpp
176
177tstDir-3_SOURCES = tstDir-3.cpp
178
179tstEnv_SOURCES = tstEnv.cpp
180
181# Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
182tstErrUnique_SOURCES = tstErrUnique.cpp
183tstErrUnique_INCS = $(IPRT_OUT_DIR)/
184tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
185
186tstFile_SOURCES = tstFile.cpp
187
188tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
189
190tstFileAio_SOURCES = tstFileAio.cpp
191
192tstFileLock_SOURCES = tstFileLock.cpp
193
194tstFork_SOURCES = tstFork.cpp
195
196tstGetOpt_SOURCES = tstGetOpt.cpp
197
198tstHandleTable_SOURCES = tstHandleTable.cpp
199
200tstHeapSimple_SOURCES = tstHeapSimple.cpp
201
202tstIoCtl_SOURCES = tstIoCtl.cpp
203
204tstInlineAsm_SOURCES = tstInlineAsm.cpp
205
206tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
207tstInlineAsmPIC_CXXFLAGS = -fPIC
208tstInlineAsmPIC_DEFS = PIC
209
210tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
211tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
212tstInlineAsmPIC3_DEFS = PIC
213
214tstLdr_SOURCES = tstLdr.cpp
215
216tstLdr-2_SOURCES = tstLdr-2.cpp
217tstLdr-2_DEFS = IN_DIS
218tstLdr-2_LIBS = \
219 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
220
221tstLdrObj_TEMPLATE = VBOXGC
222tstLdrObj_INST = $(INST_TESTCASE)
223tstLdrObj_SYSSUFF = .gc
224tstLdrObj_SOURCES = tstLdrObj.cpp
225tstLdrObj_DEFS = IN_DIS IN_RT_GC IN_RT_RC DIS_CORE_ONLY
226ifeq ($(VBOX_LDR_FMT32),elf)
227tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
228endif
229tstLdrObj_LIBS = \
230 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
231 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
232ifeq ($(VBOX_LDR_FMT32),pe)
233tstLdrObj_LDFLAGS = -Entry:Entrypoint
234tstLdrObj_LIBS += \
235 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
236endif # PE
237ifeq ($(VBOX_LDR_FMT32),elf)
238tstLdrObj_LDFLAGS = -e Entrypoint
239endif
240ifeq ($(VBOX_LDR_FMT32),lx)
241tstLdrObj_LIBS += \
242 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
243endif
244
245tstLdr-3_SOURCES = tstLdr-3.cpp
246tstLdr-3_DEFS = IN_DIS
247tstLdr-3_LIBS = \
248 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
249
250tstLdr-4Imp_TEMPLATE = VBOXR0
251ifeq ($(VBOX_LDR_FMT),lx)
252 tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
253else ifeq ($(VBOX_LDR_FMT),pe)
254 tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
255endif
256
257tstLdrObjR0_TEMPLATE = VBOXR0
258tstLdrObjR0_INST = $(INST_TESTCASE)
259tstLdrObjR0_SYSSUFF = .r0
260tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
261tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
262ifeq ($(VBOX_LDR_FMT32),elf)
263 tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
264endif
265tstLdrObjR0_LIBS = \
266 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
267 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
268ifeq ($(VBOX_LDR_FMT),pe)
269 tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
270 tstLdrObjR0_LIBS += \
271 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
272 $(TARGET_tstLdr-4Imp)
273endif
274ifeq ($(VBOX_LDR_FMT),elf)
275 tstLdrObjR0_LDFLAGS = -e Entrypoint
276endif
277ifeq ($(VBOX_LDR_FMT),lx)
278 tstLdrObjR0_LIBS += \
279 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
280 $(TARGET_tstLdr-4Imp)
281endif
282
283tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
284tstLdr-4_DEFS = IN_DIS
285tstLdr-4_LIBS = \
286 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
287
288tstLdrLoad_SOURCES = tstLdrLoad.cpp
289
290tstLog_SOURCES = tstLog.cpp
291
292tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
293
294tstRTMemPool_TEMPLATE = VBOXR3TSTEXE
295tstRTMemPool_SOURCES = tstRTMemPool.cpp
296
297tstMove_SOURCES = tstMove.cpp
298
299tstMp-1_SOURCES = tstMp-1.cpp
300
301tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
302tstNoCrt-1_SOURCES = \
303 tstNoCrt-1.cpp \
304 ../common/string/memcpy.asm \
305 ../common/string/mempcpy.asm \
306 ../common/string/memmove.asm \
307 ../common/string/memset.asm \
308 ../common/string/memchr.asm \
309 ../common/string/memcmp.asm \
310 ../common/string/strchr.asm \
311 ../common/string/strcmp.asm \
312 ../common/string/strcpy.asm \
313 ../common/string/strlen.asm
314
315tstOnce_SOURCES = tstOnce.cpp
316
317tstPath_SOURCES = tstPath.cpp
318
319tstPrfRT_SOURCES = tstPrfRT.cpp
320
321tstRand_SOURCES = tstRand.cpp
322
323tstR0ThreadPreemption_TEMPLATE = VBOXR0
324tstR0ThreadPreemption_INST = $(INST_TESTCASE)
325tstR0ThreadPreemption_DEFS = IN_RT_R0
326tstR0ThreadPreemption_SYSSUFF = .r0
327tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
328tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
329if1of ($(VBOX_LDR_FMT), pe lx)
330 tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
331endif
332
333tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
334
335tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
336
337tstRTProcWait_SOURCES = tstRTProcWait.cpp
338
339tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
340
341tstRTS3_SOURCES = tstRTS3.cpp
342
343tstSemMutex_SOURCES = tstSemMutex.cpp
344
345tstSemRW_SOURCES = tstSemRW.cpp
346
347tstSemPingPong_SOURCES = tstSemPingPong.cpp
348
349tstSems_SOURCES = tstSems.cpp
350
351tstRTStrCache_TEMPLATE = VBOXR3TSTEXE
352tstRTStrCache_SOURCES = tstRTStrCache.cpp
353
354tstStrFormat_SOURCES = tstStrFormat.cpp
355
356tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
357
358tstStrToNum_SOURCES = tstStrToNum.cpp
359
360tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
361
362tstRTTemp_TEMPLATE = VBOXR3TSTEXE
363tstRTTemp_SOURCES = tstRTTemp.cpp
364
365tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
366
367tstThread-1_SOURCES = tstThread-1.cpp
368
369tstTime_SOURCES = tstTime.cpp
370
371tstTime-2_SOURCES = tstTime-2.cpp
372
373tstTime-3_SOURCES = tstTime-3.cpp
374
375tstTime-4_SOURCES = tstTime-4.cpp
376
377tstTimer_SOURCES = tstTimer.cpp
378
379tstTimerLR_SOURCES = tstTimerLR.cpp
380
381tstTimeSpec_SOURCES = tstTimeSpec.cpp
382
383tstTSC_SOURCES = tstTSC.cpp
384tstTSC_CXXFLAGS.linux += -O3
385
386tstUuid_SOURCES = tstUuid.cpp
387
388tstUtf8_SOURCES = tstUtf8.cpp
389
390
391#
392# odds and ends
393#
394
395tstDarwinSched_SOURCES = tstDarwinSched.cpp
396
397ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
398ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
399
400endif # VBOX_WITH_TESTCASES
401
402include $(KBUILD_PATH)/subfooter.kmk
403
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