VirtualBox

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

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

iprt: applying sparc patch (selectively).

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