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