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