1 | # $Id: Makefile.kmk 106719 2024-10-26 01:36:14Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Windows NT5+ Guest Additions Mouse Filter Driver
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2011-2024 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 |
|
---|
28 | SUB_DEPTH = ../../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | #
|
---|
32 | # VBoxMouse - Windows NT5+ Guest Additions Mouse Filter Driver
|
---|
33 | #
|
---|
34 | SYSMODS += VBoxMouse
|
---|
35 | VBoxMouse_TEMPLATE := VBoxGuestR0Drv
|
---|
36 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
|
---|
37 | VBoxMouse_INSTTYPE := none
|
---|
38 | VBoxMouse_DEBUG_INSTTYPE := both
|
---|
39 | endif
|
---|
40 | VBoxMouse_DEFS = LOG_TO_BACKDOOR
|
---|
41 | VBoxMouse_SDKS.x86 = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K)
|
---|
42 | #VBoxMouse_DEFS += LOG_ENABLED
|
---|
43 | VBoxMouse_CXXFLAGS = -Od
|
---|
44 | VBoxMouse_CFLAGS = -Od
|
---|
45 | VBoxMouse_LDFLAGS.x86 = -Entry:DriverEntry@8
|
---|
46 | VBoxMouse_LDFLAGS.amd64 = -Entry:DriverEntry
|
---|
47 | VBoxMouse_LDFLAGS.arm64 = -Entry:DriverEntry
|
---|
48 | VBoxMouse_SOURCES = \
|
---|
49 | VBoxMFDriver.cpp \
|
---|
50 | VBoxMFInternal.cpp \
|
---|
51 | VBoxMF.rc
|
---|
52 | VBoxMouse_LIBS = \
|
---|
53 | $(VBOX_LIB_IPRT_GUEST_R0) \
|
---|
54 | $(VBOX_LIB_VBGL_R0) \
|
---|
55 | $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/ntoskrnl.lib \
|
---|
56 | $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/hal.lib
|
---|
57 | ifneq ($(VBOX_VCC_CC_GUARD_CF),)
|
---|
58 | VBoxMouse_LATE_LIBS.x86 = \
|
---|
59 | $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/BufferOverflowK.lib
|
---|
60 | endif
|
---|
61 | VBoxMouse_LATE_LIBS.arm64 = \
|
---|
62 | $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/BufferOverflowFastFailK.lib
|
---|
63 | VBoxMouse_USES.win += vboximportchecker
|
---|
64 | VBoxMouse_VBOX_IMPORT_CHECKER.win.x86 = w2k/r0
|
---|
65 | VBoxMouse_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
|
---|
66 | VBoxMouse_VBOX_IMPORT_CHECKER.win.arm64 = w10-1709/r0
|
---|
67 |
|
---|
68 |
|
---|
69 | #
|
---|
70 | # Install the inf & cat.
|
---|
71 | #
|
---|
72 | INSTALLS += VBoxMouse-inf
|
---|
73 | VBoxMouse-inf_INST = $(INST_ADDITIONS)
|
---|
74 | VBoxMouse-inf_MODE = a+r,u+w
|
---|
75 | VBoxMouse-inf_SOURCES = \
|
---|
76 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.inf
|
---|
77 | VBoxMouse-inf_CLEAN = $(VBoxMouse-inf_SOURCES)
|
---|
78 | VBoxMouse-inf_BLDDIRS = $(PATH_TARGET)/VBoxMouseCat.dir
|
---|
79 |
|
---|
80 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.inf: $(PATH_SUB_CURRENT)/VBoxMouse.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
81 | $(call MSG_GENERATE,VBoxMouse-inf,$@,$<)
|
---|
82 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
83 |
|
---|
84 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
|
---|
85 | VBoxMouse-inf_SOURCES += \
|
---|
86 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.sys \
|
---|
87 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.cat \
|
---|
88 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.cat=>VBoxMouse-PreW10.cat
|
---|
89 |
|
---|
90 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.sys: $$(VBoxMouse_1_TARGET) | $$(dir $$@)
|
---|
91 | $(INSTALL) -m 644 -- "$<" "$(@D)"
|
---|
92 |
|
---|
93 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.cat: \
|
---|
94 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.inf \
|
---|
95 | $(PATH_TARGET)/VBoxMouseCat.dir/VBoxMouse.sys
|
---|
96 | $(call MSG_TOOL,Inf2Cat,VBoxMouse-inf,$@,$<)
|
---|
97 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
98 | endif # signing
|
---|
99 |
|
---|
100 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|