1 | # $Id: Makefile.kmk 11064 2008-08-01 14:12:37Z 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 | ifdef VBOX_KBUILD_HACKING
|
---|
32 | SUB_DEPTH = ../../../..
|
---|
33 | else
|
---|
34 | SUB_DEPTH = ..
|
---|
35 | DEPTH ?= ../../../..
|
---|
36 | endif
|
---|
37 | include $(KBUILD_PATH)/subheader.kmk
|
---|
38 |
|
---|
39 | ifdef VBOX_WITH_TESTCASES
|
---|
40 |
|
---|
41 | #
|
---|
42 | # Globals
|
---|
43 | #
|
---|
44 | # WARNING: Careful with this wrt to the other sub-makefiles this joins.
|
---|
45 | #
|
---|
46 | TEMPLATE = VBOXR3TSTEXE
|
---|
47 |
|
---|
48 |
|
---|
49 | #
|
---|
50 | # Target lists
|
---|
51 | #
|
---|
52 | PROGRAMS += \
|
---|
53 | tstAvl \
|
---|
54 | tstBitOperations \
|
---|
55 | tstCidr \
|
---|
56 | tstCritSect \
|
---|
57 | tstDeadlock \
|
---|
58 | tstDir \
|
---|
59 | tstDir-2 \
|
---|
60 | tstEnv \
|
---|
61 | tstErrUnique \
|
---|
62 | tstFile \
|
---|
63 | tstFileLock \
|
---|
64 | tstGetOpt \
|
---|
65 | tstHandleTable \
|
---|
66 | tstHeapSimple \
|
---|
67 | tstInlineAsm \
|
---|
68 | tstLdr \
|
---|
69 | tstLdr-2 \
|
---|
70 | tstLdr-3 \
|
---|
71 | tstLdr-4 \
|
---|
72 | tstLdrLoad \
|
---|
73 | tstLog \
|
---|
74 | tstMemAutoPtr \
|
---|
75 | tstMove \
|
---|
76 | tstMp-1 \
|
---|
77 | tstNoCrt-1 \
|
---|
78 | tstOnce \
|
---|
79 | tstPath \
|
---|
80 | tstPrfRT \
|
---|
81 | tstRand \
|
---|
82 | tstRTFsQueries \
|
---|
83 | tstStrFormat \
|
---|
84 | tstStrToNum \
|
---|
85 | tstThread-1 \
|
---|
86 | tstTime \
|
---|
87 | tstTime-2 \
|
---|
88 | tstTime-3 \
|
---|
89 | tstTime-4 \
|
---|
90 | tstTimer \
|
---|
91 | tstTimerLR \
|
---|
92 | tstTimeSpec \
|
---|
93 | tstTSC \
|
---|
94 | tstUtf8 \
|
---|
95 | tstUuid
|
---|
96 | # tstSems
|
---|
97 | PROGRAMS.win += \
|
---|
98 | tstRTProcWait \
|
---|
99 | tstCritSectW32 \
|
---|
100 | tstFileAppendWin-1 \
|
---|
101 | ntGetTimerResolution
|
---|
102 | PROGRAMS.linux += \
|
---|
103 | tstRTProcWait \
|
---|
104 | tstBitOperationsPIC3 \
|
---|
105 | tstInlineAsmPIC \
|
---|
106 | tstInlineAsmPIC3 \
|
---|
107 | tstSemMutex
|
---|
108 | PROGRAMS.l4 += \
|
---|
109 | tstIoCtl
|
---|
110 | SYSMODS += \
|
---|
111 | tstLdrObj \
|
---|
112 | tstLdrObjR0
|
---|
113 | if1of ($(VBOX_LDR_FMT)), lx pe)
|
---|
114 | LIBRARIES += \
|
---|
115 | tstLdr-4Imp
|
---|
116 | endif
|
---|
117 |
|
---|
118 |
|
---|
119 |
|
---|
120 | #
|
---|
121 | # Target configs in almost alphabetical order.
|
---|
122 | #
|
---|
123 |
|
---|
124 | tstAvl_SOURCES = tstAvl.cpp
|
---|
125 |
|
---|
126 | tstBitOperations_TEMPLATE = VBOXR3TSTEXE
|
---|
127 | tstBitOperations_SOURCES = tstBitOperations.cpp
|
---|
128 |
|
---|
129 | tstBitOperationsPIC3_SOURCES = tstBitOperations.cpp
|
---|
130 | tstBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
131 | tstBitOperationsPIC3_DEFS = PIC
|
---|
132 |
|
---|
133 | tstCidr_SOURCES = tstCidr.cpp
|
---|
134 |
|
---|
135 | tstCritSect_SOURCES = tstCritSect.cpp
|
---|
136 |
|
---|
137 | tstCritSectW32_SOURCES = tstCritSect.cpp
|
---|
138 | tstCritSectW32_DEFS = TRY_WIN32_CRIT
|
---|
139 |
|
---|
140 | tstDeadlock_SOURCES = tstDeadlock.cpp
|
---|
141 |
|
---|
142 | tstDir_SOURCES = tstDir.cpp
|
---|
143 |
|
---|
144 | tstDir-2_SOURCES = tstDir-2.cpp
|
---|
145 |
|
---|
146 | tstEnv_SOURCES = tstEnv.cpp
|
---|
147 |
|
---|
148 | # Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
|
---|
149 | tstErrUnique_SOURCES = tstErrUnique.cpp
|
---|
150 | tstErrUnique_INCS = $(PATH_TARGET)/
|
---|
151 | tstErrUnique.cpp_DEPS = $(PATH_TARGET)/errmsgdata.h
|
---|
152 |
|
---|
153 | tstFile_SOURCES = tstFile.cpp
|
---|
154 |
|
---|
155 | tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
|
---|
156 |
|
---|
157 | tstFileLock_SOURCES = tstFileLock.cpp
|
---|
158 |
|
---|
159 | tstGetOpt_SOURCES = tstGetOpt.cpp
|
---|
160 |
|
---|
161 | tstHandleTable_SOURCES = tstHandleTable.cpp
|
---|
162 |
|
---|
163 | tstHeapSimple_SOURCES = tstHeapSimple.cpp
|
---|
164 |
|
---|
165 | tstIoCtl_SOURCES = tstIoCtl.cpp
|
---|
166 |
|
---|
167 | tstInlineAsm_SOURCES = tstInlineAsm.cpp
|
---|
168 |
|
---|
169 | tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
|
---|
170 | tstInlineAsmPIC_CXXFLAGS = -fPIC
|
---|
171 | tstInlineAsmPIC_DEFS = PIC
|
---|
172 |
|
---|
173 | tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
|
---|
174 | tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
|
---|
175 | tstInlineAsmPIC3_DEFS = PIC
|
---|
176 |
|
---|
177 | tstLdr_SOURCES = tstLdr.cpp
|
---|
178 |
|
---|
179 | tstLdr-2_SOURCES = tstLdr-2.cpp
|
---|
180 | tstLdr-2_DEFS = IN_DIS_R3
|
---|
181 | tstLdr-2_LIBS = \
|
---|
182 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
183 |
|
---|
184 | tstLdrObj_TEMPLATE = VBOXGC
|
---|
185 | tstLdrObj_INST = $(INST_TESTCASE)
|
---|
186 | tstLdrObj_SYSSUFF = .gc
|
---|
187 | tstLdrObj_SOURCES = tstLdrObj.cpp
|
---|
188 | tstLdrObj_DEFS = IN_DIS_GC IN_RT_GC DIS_CORE_ONLY
|
---|
189 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
190 | tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
191 | endif
|
---|
192 | tstLdrObj_LIBS = \
|
---|
193 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
194 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
195 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
196 | tstLdrObj_LDFLAGS = -Entry:Entrypoint
|
---|
197 | tstLdrObj_LIBS += \
|
---|
198 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
199 | endif # PE
|
---|
200 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
201 | tstLdrObj_LDFLAGS = -e Entrypoint
|
---|
202 | endif
|
---|
203 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
204 | tstLdrObj_LIBS += \
|
---|
205 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
206 | endif
|
---|
207 |
|
---|
208 | tstLdr-3_SOURCES = tstLdr-3.cpp
|
---|
209 | tstLdr-3_DEFS = IN_DIS_R3
|
---|
210 | tstLdr-3_LIBS = \
|
---|
211 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
212 |
|
---|
213 | tstLdr-4Imp_TEMPLATE = VBOXR0
|
---|
214 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
215 | tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
|
---|
216 | else ifeq ($(VBOX_LDR_FMT),pe)
|
---|
217 | tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
|
---|
218 | endif
|
---|
219 |
|
---|
220 | tstLdrObjR0_TEMPLATE = VBOXR0
|
---|
221 | tstLdrObjR0_INST = $(INST_TESTCASE)
|
---|
222 | tstLdrObjR0_SYSSUFF = .r0
|
---|
223 | tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
|
---|
224 | tstLdrObjR0_DEFS = IN_DIS_R0 IN_RT_R0 DIS_CORE_ONLY
|
---|
225 | ifeq ($(VBOX_LDR_FMT32),elf)
|
---|
226 | tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
|
---|
227 | endif
|
---|
228 | tstLdrObjR0_LIBS = \
|
---|
229 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
|
---|
230 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
231 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
232 | tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
|
---|
233 | tstLdrObjR0_LIBS += \
|
---|
234 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
235 | $(TARGET_tstLdr-4Imp)
|
---|
236 | endif
|
---|
237 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
238 | tstLdrObjR0_LDFLAGS = -e Entrypoint
|
---|
239 | endif
|
---|
240 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
241 | tstLdrObjR0_LIBS += \
|
---|
242 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
|
---|
243 | $(TARGET_tstLdr-4Imp)
|
---|
244 | endif
|
---|
245 |
|
---|
246 | tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
|
---|
247 | tstLdr-4_DEFS = IN_DIS_R3
|
---|
248 | tstLdr-4_LIBS = \
|
---|
249 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
250 |
|
---|
251 | tstLdrLoad_SOURCES = tstLdrLoad.cpp
|
---|
252 |
|
---|
253 | tstLog_SOURCES = tstLog.cpp
|
---|
254 |
|
---|
255 | tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
|
---|
256 |
|
---|
257 | tstMove_SOURCES = tstMove.cpp
|
---|
258 |
|
---|
259 | tstMp-1_SOURCES = tstMp-1.cpp
|
---|
260 |
|
---|
261 | tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
|
---|
262 | tstNoCrt-1_SOURCES = \
|
---|
263 | tstNoCrt-1.cpp \
|
---|
264 | ../common/string/memcpy.asm \
|
---|
265 | ../common/string/mempcpy.asm \
|
---|
266 | ../common/string/memmove.asm \
|
---|
267 | ../common/string/memset.asm \
|
---|
268 | ../common/string/memchr.asm \
|
---|
269 | ../common/string/memcmp.asm \
|
---|
270 | ../common/string/strchr.asm \
|
---|
271 | ../common/string/strcmp.asm \
|
---|
272 | ../common/string/strlen.asm
|
---|
273 |
|
---|
274 | tstOnce_SOURCES = tstOnce.cpp
|
---|
275 |
|
---|
276 | tstPath_SOURCES = tstPath.cpp
|
---|
277 |
|
---|
278 | tstPrfRT_SOURCES = tstPrfRT.cpp
|
---|
279 |
|
---|
280 | tstRand_SOURCES = tstRand.cpp
|
---|
281 |
|
---|
282 | tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
|
---|
283 |
|
---|
284 | tstRTProcWait_SOURCES = tstRTProcWait.cpp
|
---|
285 |
|
---|
286 | tstSemMutex_SOURCES = tstSemMutex.cpp
|
---|
287 |
|
---|
288 | tstSems_SOURCES = tstSems.cpp
|
---|
289 |
|
---|
290 | tstStrFormat_SOURCES = tstStrFormat.cpp
|
---|
291 |
|
---|
292 | tstStrToNum_SOURCES = tstStrToNum.cpp
|
---|
293 |
|
---|
294 | tstThread-1_SOURCES = tstThread-1.cpp
|
---|
295 |
|
---|
296 | tstTime_SOURCES = tstTime.cpp
|
---|
297 |
|
---|
298 | tstTime-2_SOURCES = tstTime-2.cpp
|
---|
299 |
|
---|
300 | tstTime-3_SOURCES = tstTime-3.cpp
|
---|
301 |
|
---|
302 | tstTime-4_SOURCES = tstTime-4.cpp
|
---|
303 |
|
---|
304 | tstTimer_SOURCES = tstTimer.cpp
|
---|
305 |
|
---|
306 | tstTimerLR_SOURCES = tstTimerLR.cpp
|
---|
307 |
|
---|
308 | tstTimeSpec_SOURCES = tstTimeSpec.cpp
|
---|
309 |
|
---|
310 | tstTSC_SOURCES = tstTSC.cpp
|
---|
311 | tstTSC_CXXFLAGS.linux += -O3
|
---|
312 |
|
---|
313 | tstUuid_SOURCES = tstUuid.cpp
|
---|
314 |
|
---|
315 | tstUtf8_SOURCES = tstUtf8.cpp
|
---|
316 |
|
---|
317 | ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
|
---|
318 | ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
319 |
|
---|
320 | endif # VBOX_WITH_TESTCASES
|
---|
321 |
|
---|
322 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
323 |
|
---|