VirtualBox

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

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

tstGetOpt -> tstRTGetOpt.

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