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