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