# $Id: Makefile.kmk 84972 2020-06-26 14:58:51Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox Windows Guest Shared Folders FSD. # # # Copyright (C) 2006-2020 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # SUB_DEPTH = ../../../../../.. include $(KBUILD_PATH)/subheader.kmk # # VBoxSF # SYSMODS += VBoxSF VBoxSF_TEMPLATE = VBOXGUESTR0 VBoxSF_DEFS = LOG_TO_BACKDOOR VBOX_WITH_HGCM IN_RING0 #VBoxSF_DEFS += LOG_ENABLED VBoxSF_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) VBoxSF_LDFLAGS.x86 = -Entry:DriverEntry@8 VBoxSF_LDFLAGS.amd64 = -Entry:DriverEntry VBoxSF_SOURCES = \ vbsf.cpp \ net.cpp \ file.cpp \ info.cpp \ path.cpp \ vbsfhlp.cpp \ VBoxSF.rc VBoxSF_SOURCES.x86 = \ Win2kWorkarounds.c \ Win2kWorkaroundsA.asm VBoxSF_LIBS = \ $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rxce.lib \ $(VBoxSF_0_OUTDIR)/rdbsslib.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/copysup.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib \ \ $(VBOX_LIB_VBGL_R0) \ $(VBOX_LIB_IPRT_GUEST_R0) VBoxSF_CLEAN = \ $(VBoxSF_0_OUTDIR)/rdbsslib.lib ifeq ($(KBUILD_TARGET_ARCH),x86) SYSMODS += VBoxSFW2K VBoxSFW2K_EXTENDS := VBoxSF VBoxSFW2K_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K3) VBoxSFW2K_LIBS = \ $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/rxce.lib \ $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/copysup.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/hal.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ksecdd.lib \ $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib \ \ $(VBOX_LIB_VBGL_R0) \ $(VBOX_LIB_IPRT_GUEST_R0) VBoxSFW2K_CLEAN = \ $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib endif include $(FILE_KBUILD_SUB_FOOTER) $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSF_0_OUTDIR)/rdbsslib.lib) ifeq ($(KBUILD_TARGET_ARCH),x86) $(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB) $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \ --select "write.obj" \ --redefine-sym "__imp__CcFlushCache@16=_g_pfnWrFlushCache" \ --redefine-sym "__imp__CcPurgeCacheSection@16=_g_pfnWrPurgeCacheSection" \ --select "read.obj" \ --redefine-sym "__imp__CcFlushCache@16=_g_pfnRdFlushCache" $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib) $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB) $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \ --select "write.obj" \ --redefine-sym "__imp__CcFlushCache@16=_g_pfnWrFlushCache" \ --redefine-sym "__imp__CcPurgeCacheSection@16=_g_pfnWrPurgeCacheSection" \ --select "read.obj" \ --redefine-sym "__imp__CcFlushCache@16=_g_pfnRdFlushCache" else $(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB) $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \ --select "write.obj" \ --redefine-sym "__imp_CcFlushCache=g_pfnWrFlushCache" \ --redefine-sym "__imp_CcPurgeCacheSection=g_pfnWrPurgeCacheSection" \ --select "read.obj" \ --redefine-sym "__imp_CcFlushCache=g_pfnRdFlushCache" endif