VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/SharedFolders/driver/Makefile.kmk@ 93668

Last change on this file since 93668 was 93272, checked in by vboxsync, 3 years ago

Add/win/VBoxSFW2K: Work around missing _aulldvrm export on w2k (probably broken for a while). [2nd attempt] bugref:10162

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1# $Id: Makefile.kmk 93272 2022-01-17 12:00:26Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Windows Guest Shared Folders FSD.
4#
5
6#
7# Copyright (C) 2006-2022 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
18SUB_DEPTH = ../../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# VBoxSF
23# Note! On X86 this is only used for windows 8 and later.
24# Note! On X86 we must link against ntoskrnl.lib from the default WDK when /guard:cf is enabled,
25# or the linker barfs at loadcfg.obj not containing a large enough load config structure.
26#
27SYSMODS += VBoxSF
28VBoxSF_TEMPLATE = VBOXGUESTR0
29VBoxSF_DEFS = LOG_TO_BACKDOOR VBOX_WITH_HGCM IN_RING0
30#VBoxSF_DEFS += LOG_ENABLED
31
32VBoxSF_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
33
34VBoxSF_LDFLAGS.x86 = -Entry:DriverEntry@8
35VBoxSF_LDFLAGS.amd64 = -Entry:DriverEntry
36VBoxSF_SOURCES = \
37 vbsf.cpp \
38 net.cpp \
39 file.cpp \
40 info.cpp \
41 path.cpp \
42 vbsfhlp.cpp \
43 VBoxSF.rc
44VBoxSF_SOURCES.x86 = \
45 Win2kWorkarounds.c \
46 Win2kWorkaroundsA.asm
47
48VBoxSF_LIBS = \
49 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rxce.lib \
50 $(VBoxSF_0_OUTDIR)/rdbsslib.lib \
51 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/copysup.lib \
52 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \
53 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib
54ifneq ($(VBOX_VCC_CC_GUARD_CF),)
55 VBoxSF_LIBS += \
56 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
57 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
58else
59 VBoxSF_LIBS += \
60 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
61 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
62endif
63VBoxSF_LIBS += \
64 $(VBOX_LIB_VBGL_R0) \
65 $(VBOX_LIB_IPRT_GUEST_R0)
66
67VBoxSF_CLEAN = \
68 $(VBoxSF_0_OUTDIR)/rdbsslib.lib
69
70VBoxSF_USES.win += vboximportchecker
71VBoxSF_VBOX_IMPORT_CHECKER.win.x86 = w8/r0
72VBoxSF_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
73
74
75ifeq ($(KBUILD_TARGET_ARCH),x86)
76 #
77 # This driver version is used for Windows 2000, XP, W2K3, Vista and 7.
78 # Note! Including int64.lib here for _aulldvrm which isn't exported by w2k.
79 #
80 SYSMODS += VBoxSFW2K
81 VBoxSFW2K_EXTENDS := VBoxSF
82 VBoxSFW2K_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K3)
83 VBoxSFW2K_LIBS = \
84 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/rxce.lib \
85 $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib \
86 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/copysup.lib \
87 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/hal.lib \
88 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ksecdd.lib \
89 \
90 $(VBOX_LIB_VBGL_R0) \
91 $(VBOX_LIB_IPRT_GUEST_R0) \
92 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB)/int64.lib
93 ifneq ($(VBOX_VCC_CC_GUARD_CF),)
94 VBoxSFW2K_LIBS += \
95 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.x86)/ntoskrnl.lib \
96 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.x86)/BufferOverflowK.lib
97 else
98 VBoxSFW2K_LIBS += \
99 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \
100 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib
101 endif
102 VBoxSFW2K_CLEAN = \
103 $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib
104 VBoxSFW2K_USES.win += vboximportchecker
105 VBoxSFW2K_VBOX_IMPORT_CHECKER.win.x86 = w2k/r0
106endif
107
108include $(FILE_KBUILD_SUB_FOOTER)
109
110$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSF_0_OUTDIR)/rdbsslib.lib)
111
112ifeq ($(KBUILD_TARGET_ARCH),x86)
113$(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
114 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
115 $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
116 --select "write.obj" \
117 --redefine-sym "__imp__CcFlushCache@16=_g_pfnWrFlushCache" \
118 --redefine-sym "__imp__CcPurgeCacheSection@16=_g_pfnWrPurgeCacheSection" \
119 --select "read.obj" \
120 --redefine-sym "__imp__CcFlushCache@16=_g_pfnRdFlushCache"
121
122$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib)
123$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
124 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
125 $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
126 --select "write.obj" \
127 --redefine-sym "__imp__CcFlushCache@16=_g_pfnWrFlushCache" \
128 --redefine-sym "__imp__CcPurgeCacheSection@16=_g_pfnWrPurgeCacheSection" \
129 --select "read.obj" \
130 --redefine-sym "__imp__CcFlushCache@16=_g_pfnRdFlushCache"
131else
132$(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
133 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
134 $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
135 --select "write.obj" \
136 --redefine-sym "__imp_CcFlushCache=g_pfnWrFlushCache" \
137 --redefine-sym "__imp_CcPurgeCacheSection=g_pfnWrPurgeCacheSection" \
138 --select "read.obj" \
139 --redefine-sym "__imp_CcFlushCache=g_pfnRdFlushCache"
140endif
141
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