1 | # $Id: Makefile.kmk 18991 2009-04-17 13:37:54Z 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 |
|
---|
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 | tstAvl \
|
---|
52 | tstBase64 \
|
---|
53 | tstBitOperations \
|
---|
54 | tstCidr \
|
---|
55 | tstCritSect \
|
---|
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 | tstSemPingPong \
|
---|
85 | tstStrFormat \
|
---|
86 | tstStrSimplePattern \
|
---|
87 | tstStrToNum \
|
---|
88 | tstSystemQueryOsInfo \
|
---|
89 | tstThread-1 \
|
---|
90 | tstTime \
|
---|
91 | tstTime-2 \
|
---|
92 | tstTime-3 \
|
---|
93 | tstTime-4 \
|
---|
94 | tstTimer \
|
---|
95 | tstTimerLR \
|
---|
96 | tstTimeSpec \
|
---|
97 | tstTSC \
|
---|
98 | tstUtf8 \
|
---|
99 | tstUuid
|
---|
100 | # tstSems
|
---|
101 | PROGRAMS.win += \
|
---|
102 | tstRTProcWait \
|
---|
103 | tstCritSectW32 \
|
---|
104 | tstFileAppendWin-1 \
|
---|
105 | ntGetTimerResolution
|
---|
106 | PROGRAMS.linux += \
|
---|
107 | tstRTProcWait \
|
---|
108 | tstRTProcIsRunningByName \
|
---|
109 | tstBitOperationsPIC3 \
|
---|
110 | tstInlineAsmPIC \
|
---|
111 | tstInlineAsmPIC3 \
|
---|
112 | tstSemMutex
|
---|
113 | PROGRAMS.l4 += \
|
---|
114 | tstIoCtl
|
---|
115 | PROGRAMS.darwin += \
|
---|
116 | tstDarwinSched
|
---|
117 | SYSMODS += \
|
---|
118 | tstLdrObj \
|
---|
119 | tstLdrObjR0
|
---|
120 | if1of ($(VBOX_LDR_FMT)), lx pe)
|
---|
121 | LIBRARIES += \
|
---|
122 | tstLdr-4Imp
|
---|
123 | endif
|
---|
124 |
|
---|
125 |
|
---|
126 |
|
---|
127 | #
|
---|
128 | # Target configs in almost alphabetical order.
|
---|
129 | #
|
---|
130 |
|
---|
131 | tstAvl_SOURCES = tstAvl.cpp
|
---|
132 |
|
---|
133 | tstBase64_TEMPLATE = VBOXR3TSTEXE
|
---|
134 | tstBase64_SOURCES = tstBase64.cpp
|
---|
135 |
|
---|
136 | tstBitOperations_TEMPLATE = VBOXR3TSTEXE
|
---|
137 | tstBitOperations_SOURCES = tstBitOperations.cpp
|
---|
138 |
|
---|
139 | tstBitOperationsPIC3_SOURCES = tstBitOperations.cpp
|
---|
140 | tstBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
141 | tstBitOperationsPIC3_DEFS = PIC
|
---|
142 |
|
---|
143 | tstCidr_SOURCES = tstCidr.cpp
|
---|
144 |
|
---|
145 | tstCritSect_SOURCES = tstCritSect.cpp
|
---|
146 |
|
---|
147 | tstCritSectW32_SOURCES = tstCritSect.cpp
|
---|
148 | tstCritSectW32_DEFS = TRY_WIN32_CRIT
|
---|
149 |
|
---|
150 | tstDarwinSched_SOURCES = tstDarwinSched.cpp
|
---|
151 |
|
---|
152 | tstDeadlock_SOURCES = tstDeadlock.cpp
|
---|
153 |
|
---|
154 | tstDir_SOURCES = tstDir.cpp
|
---|
155 |
|
---|
156 | tstDir-2_SOURCES = tstDir-2.cpp
|
---|
157 |
|
---|
158 | tstDir-3_SOURCES = tstDir-3.cpp
|
---|
159 |
|
---|
160 | tstEnv_SOURCES = tstEnv.cpp
|
---|
161 |
|
---|
162 | # Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
|
---|
163 | tstErrUnique_SOURCES = tstErrUnique.cpp
|
---|
164 | tstErrUnique_INCS = $(IPRT_OUT_DIR)/
|
---|
165 | tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
|
---|
166 |
|
---|
167 | tstFile_SOURCES = tstFile.cpp
|
---|
168 |
|
---|
169 | tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
|
---|
170 |
|
---|
171 | tstFileLock_SOURCES = tstFileLock.cpp
|
---|
172 |
|
---|
173 | tstFork_SOURCES = tstFork.cpp
|
---|
174 |
|
---|
175 | tstGetOpt_SOURCES = tstGetOpt.cpp
|
---|
176 |
|
---|
177 | tstHandleTable_SOURCES = tstHandleTable.cpp
|
---|
178 |
|
---|
179 | tstHeapSimple_SOURCES = tstHeapSimple.cpp
|
---|
180 |
|
---|
181 | tstIoCtl_SOURCES = tstIoCtl.cpp
|
---|
182 |
|
---|
183 | tstInlineAsm_SOURCES = tstInlineAsm.cpp
|
---|
184 |
|
---|
185 | tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
|
---|
186 | tstInlineAsmPIC_CXXFLAGS = -fPIC
|
---|
187 | tstInlineAsmPIC_DEFS = PIC
|
---|
188 |
|
---|
189 | tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
|
---|
190 | tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
191 | tstInlineAsmPIC3_DEFS = PIC
|
---|
192 |
|
---|
193 | tstLdr_SOURCES = tstLdr.cpp
|
---|
194 |
|
---|
195 | tstLdr-2_SOURCES = tstLdr-2.cpp
|
---|
196 | tstLdr-2_DEFS = IN_DIS
|
---|
197 | tstLdr-2_LIBS = \
|
---|
198 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
199 |
|
---|
200 | tstLdrObj_TEMPLATE = VBOXGC
|
---|
201 | tstLdrObj_INST = $(INST_TESTCASE)
|
---|
202 | tstLdrObj_SYSSUFF = .gc
|
---|
203 | tstLdrObj_SOURCES = tstLdrObj.cpp
|
---|
204 | tstLdrObj_DEFS = IN_DIS IN_RT_GC IN_RT_RC DIS_CORE_ONLY
|
---|
205 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
206 | tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
207 | endif
|
---|
208 | tstLdrObj_LIBS = \
|
---|
209 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
210 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
211 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
212 | tstLdrObj_LDFLAGS = -Entry:Entrypoint
|
---|
213 | tstLdrObj_LIBS += \
|
---|
214 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
215 | endif # PE
|
---|
216 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
217 | tstLdrObj_LDFLAGS = -e Entrypoint
|
---|
218 | endif
|
---|
219 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
220 | tstLdrObj_LIBS += \
|
---|
221 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
222 | endif
|
---|
223 |
|
---|
224 | tstLdr-3_SOURCES = tstLdr-3.cpp
|
---|
225 | tstLdr-3_DEFS = IN_DIS
|
---|
226 | tstLdr-3_LIBS = \
|
---|
227 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
228 |
|
---|
229 | tstLdr-4Imp_TEMPLATE = VBOXR0
|
---|
230 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
231 | tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
|
---|
232 | else ifeq ($(VBOX_LDR_FMT),pe)
|
---|
233 | tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
|
---|
234 | endif
|
---|
235 |
|
---|
236 | tstLdrObjR0_TEMPLATE = VBOXR0
|
---|
237 | tstLdrObjR0_INST = $(INST_TESTCASE)
|
---|
238 | tstLdrObjR0_SYSSUFF = .r0
|
---|
239 | tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
|
---|
240 | tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
|
---|
241 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
242 | tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
243 | endif
|
---|
244 | tstLdrObjR0_LIBS = \
|
---|
245 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
|
---|
246 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
247 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
248 | tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
|
---|
249 | tstLdrObjR0_LIBS += \
|
---|
250 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
251 | $(TARGET_tstLdr-4Imp)
|
---|
252 | endif
|
---|
253 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
254 | tstLdrObjR0_LDFLAGS = -e Entrypoint
|
---|
255 | endif
|
---|
256 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
257 | tstLdrObjR0_LIBS += \
|
---|
258 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
259 | $(TARGET_tstLdr-4Imp)
|
---|
260 | endif
|
---|
261 |
|
---|
262 | tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
|
---|
263 | tstLdr-4_DEFS = IN_DIS
|
---|
264 | tstLdr-4_LIBS = \
|
---|
265 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
266 |
|
---|
267 | tstLdrLoad_SOURCES = tstLdrLoad.cpp
|
---|
268 |
|
---|
269 | tstLog_SOURCES = tstLog.cpp
|
---|
270 |
|
---|
271 | tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
|
---|
272 |
|
---|
273 | tstMove_SOURCES = tstMove.cpp
|
---|
274 |
|
---|
275 | tstMp-1_SOURCES = tstMp-1.cpp
|
---|
276 |
|
---|
277 | tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
|
---|
278 | tstNoCrt-1_SOURCES = \
|
---|
279 | tstNoCrt-1.cpp \
|
---|
280 | ../common/string/memcpy.asm \
|
---|
281 | ../common/string/mempcpy.asm \
|
---|
282 | ../common/string/memmove.asm \
|
---|
283 | ../common/string/memset.asm \
|
---|
284 | ../common/string/memchr.asm \
|
---|
285 | ../common/string/memcmp.asm \
|
---|
286 | ../common/string/strchr.asm \
|
---|
287 | ../common/string/strcmp.asm \
|
---|
288 | ../common/string/strcpy.asm \
|
---|
289 | ../common/string/strlen.asm
|
---|
290 |
|
---|
291 | tstOnce_SOURCES = tstOnce.cpp
|
---|
292 |
|
---|
293 | tstPath_SOURCES = tstPath.cpp
|
---|
294 |
|
---|
295 | tstPrfRT_SOURCES = tstPrfRT.cpp
|
---|
296 |
|
---|
297 | tstRand_SOURCES = tstRand.cpp
|
---|
298 |
|
---|
299 | tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
|
---|
300 |
|
---|
301 | tstRTProcWait_SOURCES = tstRTProcWait.cpp
|
---|
302 |
|
---|
303 | tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
|
---|
304 |
|
---|
305 | tstSemMutex_SOURCES = tstSemMutex.cpp
|
---|
306 |
|
---|
307 | tstSemPingPong_SOURCES = tstSemPingPong.cpp
|
---|
308 |
|
---|
309 | tstSems_SOURCES = tstSems.cpp
|
---|
310 |
|
---|
311 | tstStrFormat_SOURCES = tstStrFormat.cpp
|
---|
312 |
|
---|
313 | tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
|
---|
314 |
|
---|
315 | tstStrToNum_SOURCES = tstStrToNum.cpp
|
---|
316 |
|
---|
317 | tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
|
---|
318 |
|
---|
319 | tstThread-1_SOURCES = tstThread-1.cpp
|
---|
320 |
|
---|
321 | tstTime_SOURCES = tstTime.cpp
|
---|
322 |
|
---|
323 | tstTime-2_SOURCES = tstTime-2.cpp
|
---|
324 |
|
---|
325 | tstTime-3_SOURCES = tstTime-3.cpp
|
---|
326 |
|
---|
327 | tstTime-4_SOURCES = tstTime-4.cpp
|
---|
328 |
|
---|
329 | tstTimer_SOURCES = tstTimer.cpp
|
---|
330 |
|
---|
331 | tstTimerLR_SOURCES = tstTimerLR.cpp
|
---|
332 |
|
---|
333 | tstTimeSpec_SOURCES = tstTimeSpec.cpp
|
---|
334 |
|
---|
335 | tstTSC_SOURCES = tstTSC.cpp
|
---|
336 | tstTSC_CXXFLAGS.linux += -O3
|
---|
337 |
|
---|
338 | tstUuid_SOURCES = tstUuid.cpp
|
---|
339 |
|
---|
340 | tstUtf8_SOURCES = tstUtf8.cpp
|
---|
341 |
|
---|
342 | ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
|
---|
343 | ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
344 |
|
---|
345 | endif # VBOX_WITH_TESTCASES
|
---|
346 |
|
---|
347 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
348 |
|
---|