VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk@ 60657

Last change on this file since 60657 was 60657, checked in by vboxsync, 9 years ago

bs3kit: updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.7 KB
Line 
1# $Id: Makefile.kmk 60657 2016-04-22 15:57:22Z vboxsync $
2## @file
3# VirtualBox Validation Kit - Bootsector Kit v3
4#
5
6#
7# Copyright (C) 2006-2016 Oracle Corporation
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
27SUB_DEPTH = ../../../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30
31
32# Boot Sector post-link tool (used via the parent Config.kmk).
33BLDPROGS += VBoxBs3Linker
34VBoxBs3Linker_TEMPLATE = VBoxBldProg
35VBoxBs3Linker_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp
36
37
38# 64-bit relocation conversion tool (used via the parent Config.kmk).
39BLDPROGS += VBoxBs3ObjConverter
40VBoxBs3ObjConverter_TEMPLATE = VBoxAdvBldProg
41VBoxBs3ObjConverter_DEFS = BS3KIT_BS3CLASS16CODE=$(BS3KIT_BS3CLASS16CODE)
42VBoxBs3ObjConverter_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp
43
44
45# The boot sector.
46MISCBINS += bs3-bootsector
47bs3-bootsector_TEMPLATE = VBoxBS3KitBS
48bs3-bootsector_SOURCES = bs3-bootsector.asm
49
50
51#
52# Common sources to be compiled into _p16, _p32 and _p64 versions.
53#
54VBOX_BS3KIT_COMMON_SOURCES = \
55 bs3-cmn-A20Disable.asm \
56 bs3-cmn-A20Enable.asm \
57 bs3-cmn-KbdRead.asm \
58 bs3-cmn-KbdWait.asm \
59 bs3-cmn-KbdWrite.asm \
60 bs3-cmn-Shutdown.asm \
61 bs3-cmn-Panic.asm \
62 bs3-cmn-PrintChr.asm \
63 bs3-cmn-Printf.c \
64 bs3-cmn-PrintU32.asm \
65 bs3-cmn-PrintX32.asm \
66 bs3-cmn-PrintStr.c \
67 bs3-cmn-PrintStrN.asm \
68 bs3-cmn-StrFormatV.c \
69 bs3-cmn-StrPrintf.c \
70 bs3-cmn-StrLen.c \
71 bs3-cmn-StrNLen.c \
72 bs3-cmn-StrCpy.c \
73 bs3-cmn-MemChr.asm \
74 bs3-cmn-MemCpy.c \
75 bs3-cmn-MemPCpy.c \
76 bs3-cmn-MemMove.c \
77 bs3-cmn-MemSet.asm \
78 bs3-cmn-MemZero.asm \
79 bs3-cmn-MemAlloc.c \
80 bs3-cmn-MemAllocZ.c \
81 bs3-cmn-MemFree.c \
82 bs3-cmn-PagingData.c \
83 bs3-cmn-PagingInitRootForPP.c \
84 bs3-cmn-PagingInitRootForPAE.c \
85 bs3-cmn-PagingInitRootForLM.c \
86 bs3-cmn-PagingProtect.c \
87 bs3-cmn-PicMaskAll.c \
88 bs3-cmn-RegCtxRestore.asm \
89 bs3-cmn-RegCtxConvertToRingX.c \
90 bs3-cmn-RegCtxPrint.c \
91 bs3-cmn-RegCtxSave.asm \
92 bs3-cmn-RegCtxSaveEx.asm \
93 bs3-cmn-SelFar32ToFlat32.c \
94 bs3-cmn-SelFar32ToFlat32NoClobber.asm \
95 bs3-cmn-SelProtFar32ToFlat32.c \
96 bs3-cmn-SelProtModeCodeToRealMode.asm \
97 bs3-cmn-SelRealModeCodeToProtMode.asm \
98 bs3-cmn-SelFlatCodeToRealMode.asm \
99 bs3-cmn-SelFlatCodeToProtFar16.asm \
100 bs3-cmn-SelRealModeDataToProtFar16.asm \
101 bs3-cmn-SelProtFar16DataToRealMode.asm \
102 bs3-cmn-SelRealModeDataToFlat.asm \
103 bs3-cmn-SelProtFar16DataToFlat.asm \
104 bs3-cmn-SelFlatDataToProtFar16.asm \
105 bs3-cmn-SelFlatDataToRealMode.asm \
106 bs3-cmn-SlabInit.c \
107 bs3-cmn-SlabAlloc.c \
108 bs3-cmn-SlabAllocEx.c \
109 bs3-cmn-SlabFree.c \
110 bs3-cmn-SlabListInit.c \
111 bs3-cmn-SlabListAdd.c \
112 bs3-cmn-SlabListAlloc.c \
113 bs3-cmn-SlabListAllocEx.c \
114 bs3-cmn-SlabListFree.c \
115 bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm \
116 bs3-cmn-SwitchHlpConvProtModeRetfPopBpDecBpAndReturn.asm \
117 bs3-cmn-SwitchToRing0.asm \
118 bs3-cmn-SwitchToRing1.asm \
119 bs3-cmn-SwitchToRing2.asm \
120 bs3-cmn-SwitchToRing3.asm \
121 bs3-cmn-SwitchToRingX.asm \
122 bs3-cmn-SwitchTo16Bit.asm \
123 bs3-cmn-SwitchTo16BitV86.asm \
124 bs3-cmn-SwitchTo32Bit.asm \
125 bs3-cmn-SwitchTo64Bit.asm \
126 bs3-cmn-Syscall.asm \
127 bs3-cmn-TestData.c \
128 bs3-cmn-TestInit.c \
129 bs3-cmn-TestFailed.c \
130 bs3-cmn-TestSkipped.c \
131 bs3-cmn-TestSub.c \
132 bs3-cmn-TestSubDone.c \
133 bs3-cmn-TestSubErrorCount.c \
134 bs3-cmn-TestTerm.c \
135 bs3-cmn-TestSendCmdWithStr.asm \
136 bs3-cmn-TestSendCmdWithU32.asm \
137 bs3-cmn-TestIsVmmDevTestingPresent.asm \
138 bs3-cmn-TestCheckRegCtxEx.c \
139 bs3-cmn-TestPrintf.c \
140 bs3-cmn-TrapRmV86Init.c \
141 bs3-cmn-TrapRmV86SetGate.c \
142 bs3-cmn-Trap16Init.c \
143 bs3-cmn-Trap16SetGate.c \
144 bs3-cmn-Trap32Init.c \
145 bs3-cmn-Trap32SetGate.c \
146 bs3-cmn-Trap64Init.c \
147 bs3-cmn-Trap64SetGate.c \
148 bs3-cmn-TrapDefaultHandler.c \
149 bs3-cmn-TrapPrintFrame.c \
150 bs3-cmn-TrapSetHandler.c \
151 bs3-cmn-TrapSetJmp.asm \
152 bs3-cmn-TrapSetJmpAndRestore.c \
153 bs3-cmn-TrapUnsetJmp.c \
154 ../../../Runtime/common/asm/ASMBitFirstClear.asm \
155 ../../../Runtime/common/asm/ASMBitFirstSet.asm \
156 ../../../Runtime/common/asm/ASMBitNextClear.asm \
157 ../../../Runtime/common/asm/ASMBitNextSet.asm \
158 ../../../Runtime/common/asm/ASMBitFirstSetU16.asm \
159 ../../../Runtime/common/asm/ASMBitFirstSetU32.asm \
160 ../../../Runtime/common/asm/ASMBitFirstSetU64.asm \
161 ../../../Runtime/common/asm/ASMBitLastSetU16.asm \
162 ../../../Runtime/common/asm/ASMBitLastSetU32.asm \
163 ../../../Runtime/common/asm/ASMBitLastSetU64.asm \
164 ../../../Runtime/common/asm/ASMMemFirstMismatchingU8.asm \
165 ../../../Runtime/common/asm/ASMSerializeInstruction-cpuid.asm \
166 ../../../Runtime/common/asm/ASMSerializeInstruction-iret.asm \
167 ../../../Runtime/common/asm/ASMSerializeInstruction-rdtscp.asm \
168
169# The 16-bit BS3Kit library.
170LIBRARIES += bs3kit-common-16
171bs3kit-common-16_TEMPLATE = VBoxBS3KitImg
172bs3kit-common-16_INSTTYPE = none
173bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY
174bs3kit-common-16_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
175bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
176 bs3-system-data.asm \
177 bs3-rm-InitAll.c \
178 bs3-rm-InitMemory.c \
179 bs3-rm-InitGdt.c \
180 bs3-cmn-hexdigits.c \
181 bs3-cmn-CpuDetectData.c \
182 bs3-cmn-PerCpuData.c \
183 bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \
184 bs3-cmn-UInt64Div.c \
185 bs3-cmn-UInt32Div.c \
186 bs3-wc16-U8DR.asm \
187 bs3-wc16-U8DQ.asm \
188 bs3-wc16-I8DR.asm \
189 bs3-wc16-I8DQ.asm \
190 bs3-wc16-I8RS.asm \
191 bs3-wc16-U8RS.asm \
192 bs3-wc16-U8LS.asm \
193 bs3-wc16-U4D.asm \
194 bs3-wc16-I4D.asm \
195 bs3-c16-Trap16Generic.asm \
196 bs3-c16-TrapRmV86Generic.asm \
197 bs3-c16-Trap16RmV86Data.asm \
198 bs3-c16-TrapRmV86Data.c \
199 bs3-c16-CreateHybridFarRet.asm
200bs3kit-common-16_bs3-cmn-UInt64Div.c_CFLAGS = -oh -d0 # -d1+ vs -d0 saves 0x6a3-0x577 = 0x12C (300)!
201
202$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMMemFirstMismatchingU8,8)
203$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMMemFirstNonZero,6)
204-include $(PATH_SUB_CURRENT)/bs3kit-autostubs.kmk # manually generated from headers, see bottom of this file.
205
206# The 32-bit BS3Kit library.
207LIBRARIES += bs3kit-common-32
208bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32
209bs3kit-common-32_INSTTYPE = none
210bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY
211bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
212bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
213 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \
214 bs3-cmn-UInt64Div.c \
215 bs3-wc32-U8D.asm \
216 bs3-wc32-I8D.asm \
217 bs3-wc32-I8RS.asm \
218 bs3-wc32-U8RS.asm \
219 bs3-wc32-U8LS.asm \
220 bs3-c32-Trap32Generic.asm
221
222# The 64-bit BS3Kit library.
223LIBRARIES += bs3kit-common-64
224bs3kit-common-64_TEMPLATE = VBoxBS3KitImg64
225bs3kit-common-64_INSTTYPE = none
226bs3kit-common-64_DEFS = TMPL_LM64 BS3_CMN_ONLY
227bs3kit-common-64_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
228bs3kit-common-64_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
229 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \
230 bs3-c64-Trap64Generic.asm \
231 ../../../Runtime/common/asm/ASMGetIDTR.asm \
232 ../../../Runtime/common/asm/ASMSetIDTR.asm \
233 ../../../Runtime/common/asm/ASMGetGDTR.asm \
234 ../../../Runtime/common/asm/ASMSetGDTR.asm \
235
236
237#
238# Common sources to be compiled for each CPU mode.
239#
240VBOX_BS3KIT_MODE_SOURCES = \
241 bs3-mode-Name.asm \
242 bs3-mode-SwitchToRM.asm \
243 bs3-mode-SwitchToPE16.asm \
244 bs3-mode-SwitchToPE16_32.asm \
245 bs3-mode-SwitchToPE16_V86.asm \
246 bs3-mode-SwitchToPE32.asm \
247 bs3-mode-SwitchToPE32_16.asm \
248 bs3-mode-SwitchToPEV86.asm \
249 bs3-mode-SwitchToPP16.asm \
250 bs3-mode-SwitchToPP16_32.asm \
251 bs3-mode-SwitchToPP16_V86.asm \
252 bs3-mode-SwitchToPP32.asm \
253 bs3-mode-SwitchToPP32_16.asm \
254 bs3-mode-SwitchToPPV86.asm \
255 bs3-mode-SwitchToPAE16.asm \
256 bs3-mode-SwitchToPAE16_32.asm \
257 bs3-mode-SwitchToPAE16_V86.asm \
258 bs3-mode-SwitchToPAE32.asm \
259 bs3-mode-SwitchToPAE32_16.asm \
260 bs3-mode-SwitchToPAEV86.asm \
261 bs3-mode-SwitchToLM64.asm \
262 bs3-mode-SwitchToLM32.asm \
263 bs3-mode-SwitchToLM16.asm \
264 bs3-mode-EnteredMode.asm \
265 bs3-mode-PagingGetRootForPP16.asm \
266 bs3-mode-PagingGetRootForPP32.asm \
267 bs3-mode-PagingGetRootForPAE16.asm \
268 bs3-mode-PagingGetRootForPAE32.asm \
269 bs3-mode-PagingGetRootForLM64.asm \
270 bs3-mode-TrapInit.c \
271 bs3-mode-TrapSystemCallHandler.asm \
272 bs3-mode-TestDoModes.c \
273 bs3-mode-TestDoModesHlp.asm \
274
275# The 16-bit real mode BS3Kit library.
276LIBRARIES += bs3kit-rm
277bs3kit-rm_TEMPLATE = VBoxBS3KitImg
278bs3kit-rm_INSTTYPE = none
279bs3kit-rm_DEFS = TMPL_MODE=BS3_MODE_RM
280bs3kit-rm_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
281 bs3-first-rm.asm \
282 bs3-mode-CpuDetect.asm
283
284
285# The 16-bit BS3Kit library for 16-bit protected kernel+tss.
286LIBRARIES += bs3kit-pe16
287bs3kit-pe16_TEMPLATE = VBoxBS3KitImg
288bs3kit-pe16_INSTTYPE = none
289bs3kit-pe16_DEFS = TMPL_MODE=BS3_MODE_PE16
290bs3kit-pe16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
291 bs3-first-pe16.asm \
292# bs3-mode-CpuDetect.asm
293
294# The 32-bit BS3Kit library for 16-bit protected kernel+tss.
295LIBRARIES += bs3kit-pe16_32
296bs3kit-pe16_32_TEMPLATE = VBoxBS3KitImg32
297bs3kit-pe16_32_INSTTYPE = none
298bs3kit-pe16_32_DEFS = TMPL_MODE=BS3_MODE_PE16_32
299bs3kit-pe16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
300
301# The v86 BS3Kit library for 16-bit protected kernel+tss.
302LIBRARIES += bs3kit-pe16_v86
303bs3kit-pe16_v86_TEMPLATE = VBoxBS3KitImg
304bs3kit-pe16_v86_INSTTYPE = none
305bs3kit-pe16_v86_DEFS = TMPL_MODE=BS3_MODE_PE16_V86
306bs3kit-pe16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
307
308# The 32-bit BS3Kit library for 32-bit protected kernel+tss.
309LIBRARIES += bs3kit-pe32
310bs3kit-pe32_TEMPLATE = VBoxBS3KitImg32
311bs3kit-pe32_INSTTYPE = none
312bs3kit-pe32_DEFS = TMPL_MODE=BS3_MODE_PE32
313bs3kit-pe32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
314
315# The 16-bit BS3Kit library for 32-bit protected kernel+tss.
316LIBRARIES += bs3kit-pe32_16
317bs3kit-pe32_16_TEMPLATE = VBoxBS3KitImg
318bs3kit-pe32_16_INSTTYPE = none
319bs3kit-pe32_16_DEFS = TMPL_MODE=BS3_MODE_PE32_16
320bs3kit-pe32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
321
322# The v8086 BS3Kit library for 32-bit protected kernel+tss.
323LIBRARIES += bs3kit-pev86
324bs3kit-pev86_TEMPLATE = VBoxBS3KitImg
325bs3kit-pev86_INSTTYPE = none
326bs3kit-pev86_DEFS = TMPL_MODE=BS3_MODE_PEV86
327bs3kit-pev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
328
329
330# The 16-bit BS3Kit library for 16-bit paged protected kernel+tss.
331LIBRARIES += bs3kit-pp16
332bs3kit-pp16_TEMPLATE = VBoxBS3KitImg
333bs3kit-pp16_INSTTYPE = none
334bs3kit-pp16_DEFS = TMPL_MODE=BS3_MODE_PP16
335bs3kit-pp16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
336 bs3-mode-CpuDetect.asm
337
338# The 32-bit BS3Kit library for 16-bit paged protected kernel+tss.
339LIBRARIES += bs3kit-pp16_32
340bs3kit-pp16_32_TEMPLATE = VBoxBS3KitImg32
341bs3kit-pp16_32_INSTTYPE = none
342bs3kit-pp16_32_DEFS = TMPL_MODE=BS3_MODE_PP16_32
343bs3kit-pp16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
344
345# The v8086 BS3Kit library for 16-bit paged protected kernel+tss.
346LIBRARIES += bs3kit-pp16_v86
347bs3kit-pp16_v86_TEMPLATE = VBoxBS3KitImg
348bs3kit-pp16_v86_INSTTYPE = none
349bs3kit-pp16_v86_DEFS = TMPL_MODE=BS3_MODE_PP16_V86
350bs3kit-pp16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
351
352# The 32-bit BS3Kit library for 32-bit paged protected kernel+tss.
353LIBRARIES += bs3kit-pp32
354bs3kit-pp32_TEMPLATE = VBoxBS3KitImg32
355bs3kit-pp32_INSTTYPE = none
356bs3kit-pp32_DEFS = TMPL_MODE=BS3_MODE_PP32
357bs3kit-pp32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
358
359# The 16-bit BS3Kit library for 32-bit paged protected kernel+tss.
360LIBRARIES += bs3kit-pp32_16
361bs3kit-pp32_16_TEMPLATE = VBoxBS3KitImg
362bs3kit-pp32_16_INSTTYPE = none
363bs3kit-pp32_16_DEFS = TMPL_MODE=BS3_MODE_PP32_16
364bs3kit-pp32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
365
366# The v8086 BS3Kit library for 32-bit paged protected kernel+tss.
367LIBRARIES += bs3kit-ppv86
368bs3kit-ppv86_TEMPLATE = VBoxBS3KitImg
369bs3kit-ppv86_INSTTYPE = none
370bs3kit-ppv86_DEFS = TMPL_MODE=BS3_MODE_PPV86
371bs3kit-ppv86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
372
373
374# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
375LIBRARIES += bs3kit-pae16
376bs3kit-pae16_TEMPLATE = VBoxBS3KitImg
377bs3kit-pae16_INSTTYPE = none
378bs3kit-pae16_DEFS = TMPL_MODE=BS3_MODE_PAE16
379bs3kit-pae16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
380 bs3-mode-CpuDetect.asm
381
382# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
383LIBRARIES += bs3kit-pae16_32
384bs3kit-pae16_32_TEMPLATE = VBoxBS3KitImg32
385bs3kit-pae16_32_INSTTYPE = none
386bs3kit-pae16_32_DEFS = TMPL_MODE=BS3_MODE_PAE16_32
387bs3kit-pae16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
388
389# The v8086 BS3Kit library for 16-bit PAE paged protected kernel+tss.
390LIBRARIES += bs3kit-pae16_v86
391bs3kit-pae16_v86_TEMPLATE = VBoxBS3KitImg
392bs3kit-pae16_v86_INSTTYPE = none
393bs3kit-pae16_v86_DEFS = TMPL_MODE=BS3_MODE_PAE16_V86
394bs3kit-pae16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
395
396# The 32-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
397LIBRARIES += bs3kit-pae32
398bs3kit-pae32_TEMPLATE = VBoxBS3KitImg32
399bs3kit-pae32_INSTTYPE = none
400bs3kit-pae32_DEFS = TMPL_MODE=BS3_MODE_PAE32
401bs3kit-pae32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
402
403# The 16-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
404LIBRARIES += bs3kit-pae32_16
405bs3kit-pae32_16_TEMPLATE = VBoxBS3KitImg
406bs3kit-pae32_16_INSTTYPE = none
407bs3kit-pae32_16_DEFS = TMPL_MODE=BS3_MODE_PAE32_16
408bs3kit-pae32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
409
410# The v8086 BS3Kit library for 32-bit PAE paged protected kernel+tss.
411LIBRARIES += bs3kit-paev86
412bs3kit-paev86_TEMPLATE = VBoxBS3KitImg
413bs3kit-paev86_INSTTYPE = none
414bs3kit-paev86_DEFS = TMPL_MODE=BS3_MODE_PAEV86
415bs3kit-paev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
416
417
418# The 16-bit long mode BS3Kit library.
419LIBRARIES += bs3kit-lm16
420bs3kit-lm16_TEMPLATE = VBoxBS3KitImg
421bs3kit-lm16_INSTTYPE = none
422bs3kit-lm16_DEFS = TMPL_MODE=BS3_MODE_LM16
423bs3kit-lm16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
424
425# The 32-bit long mode BS3Kit library.
426LIBRARIES += bs3kit-lm32
427bs3kit-lm32_TEMPLATE = VBoxBS3KitImg32
428bs3kit-lm32_INSTTYPE = none
429bs3kit-lm32_DEFS = TMPL_MODE=BS3_MODE_LM32
430bs3kit-lm32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
431
432# The 64-bit long mode BS3Kit library.
433LIBRARIES += bs3kit-lm64
434bs3kit-lm64_TEMPLATE = VBoxBS3KitImg64
435bs3kit-lm64_INSTTYPE = none
436bs3kit-lm64_DEFS = TMPL_MODE=BS3_MODE_LM64
437bs3kit-lm64_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
438
439
440#
441# shutdown example.
442#
443MISCBINS += bs3-shutdown
444bs3-shutdown_TEMPLATE = VBoxBS3KitImg
445bs3-shutdown_SOURCES = \
446 bs3-first-pe16.asm \
447 bs3-shutdown.c
448
449
450#
451# DOS Utilities / Testcases.
452#
453MISCBINS += bs3cpudt
454bs3cpudt_TEMPLATE = VBoxBS3KitUtil
455bs3cpudt_SOURCES = \
456 bs3-first-dosexe.asm \
457 bs3cpudt.c
458
459
460#
461# Rule for regenerating bs3kit-mangling-functions-undef.h.
462#
463bs3kit-mangling-code-undef.h: $(PATH_SUB_CURRENT)/bs3kit-mangling-code-define.h $(MAKEFILE)
464 $(SED) \
465 -e 's/#\( *\)define \([a-zA-Z_][a-zA-Z0-9_]*\) .*$(DOLLAR)/#\1undef \2/' \
466 -e 's/Function needing mangling.*$(DOLLAR)/Undefining function mangling - automatically generated by the $@ makefile rule./' \
467 --output $(dir $<)bs3kit-mangling-code-undef.h \
468 $<
469
470#
471# Rule for regenerating bs3kit-mangling-functions-define.h.
472#
473bs3kit-mangling-code-define.h: \
474 $(PATH_SUB_CURRENT)/bs3kit.h \
475 $(PATH_SUB_CURRENT)/bs3-cmn-paging.h \
476 $(PATH_SUB_CURRENT)/bs3-cmn-test.h \
477 $(MAKEFILE)
478 $(APPEND) -tn "$(dir $<)$@" \
479 '/* $(DOLLAR)Id: $(DOLLAR) */' \
480 '/** @file' \
481 ' * BS3Kit - Function needing mangling - generated by the $@ makefile rule.' \
482 ' */' \
483 '' \
484 '/*' \
485 ' * Copyright (C) 2007-2016 Oracle Corporation' \
486 ' *' \
487 ' * This file is part of VirtualBox Open Source Edition (OSE), as' \
488 ' * available from http://www.virtualbox.org. This file is free software;' \
489 ' * you can redistribute it and/or modify it under the terms of the GNU' \
490 ' * General Public License (GPL) as published by the Free Software' \
491 ' * Foundation, in version 2 as it comes in the "COPYING" file of the' \
492 ' * VirtualBox OSE distribution. VirtualBox OSE is distributed in the' \
493 ' * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.' \
494 ' *' \
495 ' * The contents of this file may alternatively be used under the terms' \
496 ' * of the Common Development and Distribution License Version 1.0' \
497 ' * (CDDL) only, as it comes in the "COPYING.CDDL" file of the' \
498 ' * VirtualBox OSE distribution, in which case the provisions of the' \
499 ' * CDDL are applicable instead of those of the GPL.' \
500 ' *' \
501 ' * You may elect to license modified versions of this file under the' \
502 ' * terms and conditions of either the GPL or the CDDL or both.' \
503 ' */' \
504 ''
505 $(SED) -n \
506 -e 's/^ *BS3_CMN_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/#define \1 BS3_CMN_MANGLER(\1)/p' \
507 -e 's/^ *BS3_CMN_PROTO_NOSB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/#define \1 BS3_CMN_MANGLER(\1)/p' \
508 -e 's/^ *BS3_CMN_PROTO_FARSTUB([^,]*,[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/#define \1 BS3_CMN_MANGLER(\1)/p' \
509 $(filter %.h,$^) | sort >> "$(dir $<)bs3kit-mangling-code-define.h"
510 $(APPEND) -n "$(dir $<)$@" '#ifndef BS3_CMN_ONLY'
511 $(SED) -n \
512 -e 's/^ *BS3_MODE_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/# define \1 BS3_MODE_MANGLER(\1)/p' \
513 -e 's/^ *BS3_MODE_PROTO_NOSB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/# define \1 BS3_MODE_MANGLER(\1)/p' \
514 -e 's/^ *BS3_MODE_PROTO_FARSTUB([^,]*,[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/# define \1 BS3_MODE_MANGLER(\1)/p' \
515 $(filter %.h,$^) | sort >> "$(dir $<)bs3kit-mangling-code-define.h"
516 $(APPEND) -n "$(dir $<)$@" '#endif /* !BS3_CMN_ONLY */'
517
518#
519# Rule for regenerating bs3kit-autostubs.kmk.
520#
521bs3kit-autostubs.kmk: \
522 $(PATH_SUB_CURRENT)/bs3kit.h \
523 $(PATH_SUB_CURRENT)/bs3-cmn-memory.h \
524 $(PATH_SUB_CURRENT)/bs3-cmn-paging.h \
525 $(PATH_SUB_CURRENT)/bs3-cmn-test.h \
526 $(MAKEFILE)
527 $(APPEND) -tn "$(dir $<)$@" \
528 '# $(DOLLAR)Id: $(DOLLAR)' \
529 '## @file' \
530 '# BS3Kit - Automatic near/far stubs - generated by the $@ makefile rule.' \
531 '#' \
532 '' \
533 '#' \
534 '# Copyright (C) 2007-2016 Oracle Corporation' \
535 '#' \
536 '# This file is part of VirtualBox Open Source Edition (OSE), as' \
537 '# available from http://www.virtualbox.org. This file is free software;' \
538 '# you can redistribute it and/or modify it under the terms of the GNU' \
539 '# General Public License (GPL) as published by the Free Software' \
540 '# Foundation, in version 2 as it comes in the "COPYING" file of the' \
541 '# VirtualBox OSE distribution. VirtualBox OSE is distributed in the' \
542 '# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.' \
543 '#' \
544 '# The contents of this file may alternatively be used under the terms' \
545 '# of the Common Development and Distribution License Version 1.0' \
546 '# (CDDL) only, as it comes in the "COPYING.CDDL" file of the' \
547 '# VirtualBox OSE distribution, in which case the provisions of the' \
548 '# CDDL are applicable instead of those of the GPL.' \
549 '#' \
550 '# You may elect to license modified versions of this file under the' \
551 '# terms and conditions of either the GPL or the CDDL or both.' \
552 '#' \
553 ''
554 $(SED) -n \
555 -e '/^ *BS3_CMN_PROTO_STUB/p' \
556 -e '/^ *BS3_CMN_PROTO_FARSTUB/p' \
557 -e '/^ *BS3_MODE_PROTO_STUB/p' \
558 -e '/^ *BS3_MODE_PROTO_FARSTUB/p' \
559 $(filter %.h,$^) \
560 | sort \
561 | $(SED) -n \
562 -e 's/^ *BS3_CMN_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,\1)/p' \
563 -e 's/^ *BS3_MODE_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,\1)/p' \
564 -e 's/^ *BS3_CMN_PROTO_FARSTUB( *\([^,]*\),[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,\2,\1)/p' \
565 -e 's/^ *BS3_MODE_PROTO_FARSTUB( *\([^,]*\),[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_MODE_FARSTUB,bs3kit-common-16,\2,\1)/p' \
566 --append "$(dir $<)$@"
567
568bs3kit-update:: bs3kit-autostubs.kmk bs3kit-mangling-code-define.h bs3kit-mangling-code-undef.h
569.NOTPARALLEL: bs3kit-autostubs.kmk bs3kit-mangling-code-define.h bs3kit-mangling-code-undef.h
570
571
572include $(FILE_KBUILD_SUB_FOOTER)
573
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette