1 | # $Id: Makefile.kmk 106908 2024-11-09 01:46:17Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Windows Guest Additions Installer Helper DLL.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2010-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 | # Include Sub-Makefiles.
|
---|
32 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
33 |
|
---|
34 |
|
---|
35 | #
|
---|
36 | # VBoxGuestInstallHelper - Helps with various installation tasks.
|
---|
37 | #
|
---|
38 | PROGRAMS += VBoxGuestInstallHelper
|
---|
39 | VBoxGuestInstallHelper_TEMPLATE = VBoxGuestR3Exe
|
---|
40 | VBoxGuestInstallHelper_DEFS = _UNICODE UNICODE
|
---|
41 | VBoxGuestInstallHelper_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
42 | ifdef VBOX_WITH_WDDM
|
---|
43 | VBoxGuestInstallHelper_DEFS += VBOX_WITH_WDDM
|
---|
44 | endif
|
---|
45 | if1of ($(KBUILD_TARGET_ARCH), x86)
|
---|
46 | VBoxGuestInstallHelper_DEFS += _WIN32_WINNT=0x0400
|
---|
47 | else if1of ($(KBUILD_TARGET_ARCH), amd64)
|
---|
48 | VBoxGuestInstallHelper_DEFS += _WIN32_WINNT=0x0501
|
---|
49 | endif
|
---|
50 | VBoxGuestInstallHelper_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
51 | VBoxGuestInstallHelper_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK_GST) $(VBOX_WINDDK_GST)
|
---|
52 | VBoxGuestInstallHelper_INCS = ../../include
|
---|
53 | VBoxGuestInstallHelper_SOURCES = \
|
---|
54 | VBoxGuestInstallHelper.cpp \
|
---|
55 | VBoxGuestInstallHelper.rc \
|
---|
56 | $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvCommon.cpp \
|
---|
57 | $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvInst.cpp \
|
---|
58 | $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvStore.cpp
|
---|
59 | VBoxGuestInstallHelper_VBOX_IMPORT_CHECKER.win.x86 := nt4 # setupapi was introduced in NT4
|
---|
60 |
|
---|
61 |
|
---|
62 | #
|
---|
63 | # Stripped down DLL template for arm64.
|
---|
64 | #
|
---|
65 | TEMPLATE_VBoxGuestInstallHelperDllTemplateWithFewerLibs = hack
|
---|
66 | TEMPLATE_VBoxGuestInstallHelperDllTemplateWithFewerLibs_EXTENDS := VBoxGuestR3Dll
|
---|
67 | TEMPLATE_VBoxGuestInstallHelperDllTemplateWithFewerLibs_LATE_LIBS.x86 = \
|
---|
68 | $(filter-out %/VBoxGuestR3LibShared-x86.lib,$(TEMPLATE_VBoxGuestR3Dll_LATE_LIBS.x86))
|
---|
69 |
|
---|
70 | #
|
---|
71 | # NSIS plugins have to match the NSIS architecture, so 32-bit x86 in our case.
|
---|
72 | #
|
---|
73 | # Note! Installation is required for repacking Guest Additions
|
---|
74 | #
|
---|
75 | DLLS += VBoxGuestInstallHelperDll
|
---|
76 | VBoxGuestInstallHelperDll_TEMPLATE := VBoxGuestInstallHelperDllTemplateWithFewerLibs
|
---|
77 | VBoxGuestInstallHelperDll_NAME := VBoxGuestInstallHelper
|
---|
78 | VBoxGuestInstallHelperDll_BLD_TRG_ARCH := x86
|
---|
79 | VBoxGuestInstallHelperDll_INST := repackadd/resources/VBoxGuestInstallHelperDll/
|
---|
80 | ifdef VBOX_SIGN_ADDITIONS # (See the parent makefile.)
|
---|
81 | VBoxGuestInstallHelperDll_INSTTYPE := stage
|
---|
82 | VBoxGuestInstallHelperDll_DEBUG_INSTTYPE := both
|
---|
83 | endif
|
---|
84 | VBoxGuestInstallHelperDll_DEFS := WIN32_LEAN_AND_MEAN=1 UNICODE _UNICODE
|
---|
85 | if1of ($(KBUILD_TARGET_ARCH), x86)
|
---|
86 | VBoxGuestInstallHelperDll_DEFS += _WIN32_WINNT=0x0400
|
---|
87 | VBoxGuestInstallHelperDll_VBOX_IMPORT_CHECKER.win.x86 := nt4
|
---|
88 | else if1of ($(KBUILD_TARGET_ARCH), amd64)
|
---|
89 | VBoxGuestInstallHelperDll_DEFS += _WIN32_WINNT=0x0501
|
---|
90 | VBoxGuestInstallHelperDll_VBOX_IMPORT_CHECKER.win.x86 := xp
|
---|
91 | else
|
---|
92 | VBoxGuestInstallHelperDll_DEFS += _WIN32_WINNT=0x0a00
|
---|
93 | VBoxGuestInstallHelperDll_VBOX_IMPORT_CHECKER.win.x86 := w8
|
---|
94 | endif
|
---|
95 | VBoxGuestInstallHelperDll_SOURCES := \
|
---|
96 | VBoxGuestInstallHelperDll.cpp \
|
---|
97 | VBoxGuestInstallHelperDll.rc \
|
---|
98 | $(PATH_ROOT)/src/VBox/Runtime/generic/RTLogWriteUser-generic.cpp
|
---|
99 | VBoxGuestInstallHelperDll_INCS := \
|
---|
100 | $(PATH_ROOT)/src/VBox/Runtime/include
|
---|
101 |
|
---|
102 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|