VirtualBox

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

Last change on this file since 20139 was 20111, checked in by vboxsync, 16 years ago

IPRT: Use the generic RTDirCreateTemp implementation - made it a bit more flexible and added a testcase for it.

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