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