VirtualBox

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

Last change on this file since 20567 was 20563, checked in by vboxsync, 16 years ago

IPRT/testcase: corrections.

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