VirtualBox

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

Last change on this file since 96686 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 KB
Line 
1# $Id: Makefile.kmk 96407 2022-08-22 17:43:14Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Windows Guest Shared Folders FSD.
4#
5
6#
7# Copyright (C) 2006-2022 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31#
32# VBoxSF
33# Note! On X86 this is only used for windows 8 and later.
34# Note! On X86 we must link against ntoskrnl.lib from the default WDK when /guard:cf is enabled,
35# or the linker barfs at loadcfg.obj not containing a large enough load config structure.
36#
37SYSMODS += VBoxSF
38VBoxSF_TEMPLATE = VBOXGUESTR0
39VBoxSF_DEFS = LOG_TO_BACKDOOR VBOX_WITH_HGCM IN_RING0
40#VBoxSF_DEFS += LOG_ENABLED
41
42VBoxSF_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
43
44VBoxSF_LDFLAGS.x86 = -Entry:DriverEntry@8
45VBoxSF_LDFLAGS.amd64 = -Entry:DriverEntry
46VBoxSF_SOURCES = \
47 vbsf.cpp \
48 net.cpp \
49 file.cpp \
50 info.cpp \
51 path.cpp \
52 vbsfhlp.cpp \
53 VBoxSF.rc
54VBoxSF_SOURCES.x86 = \
55 Win2kWorkarounds.c \
56 Win2kWorkaroundsA.asm
57
58VBoxSF_LIBS = \
59 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rxce.lib \
60 $(VBoxSF_0_OUTDIR)/rdbsslib.lib \
61 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/copysup.lib \
62 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \
63 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib
64ifneq ($(VBOX_VCC_CC_GUARD_CF),)
65 VBoxSF_LIBS += \
66 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
67 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
68else
69 VBoxSF_LIBS += \
70 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
71 $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
72endif
73VBoxSF_LIBS += \
74 $(VBOX_LIB_VBGL_R0) \
75 $(VBOX_LIB_IPRT_GUEST_R0)
76
77VBoxSF_CLEAN = \
78 $(VBoxSF_0_OUTDIR)/rdbsslib.lib
79
80VBoxSF_USES.win += vboximportchecker
81VBoxSF_VBOX_IMPORT_CHECKER.win.x86 = w8/r0
82VBoxSF_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
83
84
85ifeq ($(KBUILD_TARGET_ARCH),x86)
86 #
87 # This driver version is used for Windows 2000, XP, W2K3, Vista and 7.
88 # Note! Including int64.lib here for _aulldvrm which isn't exported by w2k.
89 #
90 SYSMODS += VBoxSFW2K
91 VBoxSFW2K_EXTENDS := VBoxSF
92 VBoxSFW2K_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K3)
93 VBoxSFW2K_LIBS = \
94 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/rxce.lib \
95 $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib \
96 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/copysup.lib \
97 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/hal.lib \
98 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ksecdd.lib \
99 \
100 $(VBOX_LIB_VBGL_R0) \
101 $(VBOX_LIB_IPRT_GUEST_R0) \
102 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB)/int64.lib
103 ifneq ($(VBOX_VCC_CC_GUARD_CF),)
104 VBoxSFW2K_LIBS += \
105 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.x86)/ntoskrnl.lib \
106 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.x86)/BufferOverflowK.lib
107 else
108 VBoxSFW2K_LIBS += \
109 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \
110 $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib
111 endif
112 VBoxSFW2K_CLEAN = \
113 $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib
114 VBoxSFW2K_USES.win += vboximportchecker
115 VBoxSFW2K_VBOX_IMPORT_CHECKER.win.x86 = w2k/r0
116endif
117
118include $(FILE_KBUILD_SUB_FOOTER)
119
120$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSF_0_OUTDIR)/rdbsslib.lib)
121
122ifeq ($(KBUILD_TARGET_ARCH),x86)
123$(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_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_WLH)_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"
131
132$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib)
133$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
134 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
135 $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
136 --select "write.obj" \
137 --redefine-sym "__imp__CcFlushCache@16=_g_pfnWrFlushCache" \
138 --redefine-sym "__imp__CcPurgeCacheSection@16=_g_pfnWrPurgeCacheSection" \
139 --select "read.obj" \
140 --redefine-sym "__imp__CcFlushCache@16=_g_pfnRdFlushCache"
141else
142$(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
143 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
144 $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
145 --select "write.obj" \
146 --redefine-sym "__imp_CcFlushCache=g_pfnWrFlushCache" \
147 --redefine-sym "__imp_CcPurgeCacheSection=g_pfnWrPurgeCacheSection" \
148 --select "read.obj" \
149 --redefine-sym "__imp_CcFlushCache=g_pfnRdFlushCache"
150endif
151
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