1 | # $Id: Makefile.kmk 96684 2022-09-09 23:30:23Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Guest Additions loader.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008-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 |
|
---|
28 | SUB_DEPTH = ../../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | # This has to be 32-bit.
|
---|
32 | PROGRAMS += VBoxWindowsAdditions
|
---|
33 | VBoxWindowsAdditions_TEMPLATE= VBoxGuestR3Exe
|
---|
34 | VBoxWindowsAdditions_BLD_TRG_ARCH = x86
|
---|
35 | VBoxWindowsAdditions_DEFS = _WIN32_WINNT=0x0400
|
---|
36 | VBoxWindowsAdditions_INCS = ../../include
|
---|
37 | VBoxWindowsAdditions_SOURCES = \
|
---|
38 | VBoxWindowsAdditions.cpp \
|
---|
39 | VBoxWindowsAdditions.rc
|
---|
40 | ifdef VBOX_WITH_NOCRT_STATIC
|
---|
41 | VBoxWindowsAdditions_LDFLAGS = /SubSystem:Windows
|
---|
42 | else
|
---|
43 | VBoxWindowsAdditions_LDFLAGS = \
|
---|
44 | /DISALLOWLIB:msvcrt.lib \
|
---|
45 | /DISALLOWLIB:msvcprt.lib \
|
---|
46 | /DISALLOWLIB:libcmt.lib
|
---|
47 | VBoxWindowsAdditions_LIBS = \
|
---|
48 | $(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.$(KBUILD_TARGET_ARCH))_LIB)/oldnames.lib \
|
---|
49 | $(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.$(KBUILD_TARGET_ARCH))_LIB)/libcmt.lib \
|
---|
50 | $(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.$(KBUILD_TARGET_ARCH))_LIB)/libcpmt.lib
|
---|
51 | endif
|
---|
52 | VBoxWindowsAdditions_VBOX_IMPORT_CHECKER.win.x86 := nt4
|
---|
53 |
|
---|
54 | # Version stuff.
|
---|
55 | VBoxWindowsAdditions.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
56 | VBoxWindowsAdditions.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
57 |
|
---|
58 | # The icon location is configurable.
|
---|
59 | VBoxWindowsAdditions.rc_INCS += $(VBoxWindowsAdditions_0_OUTDIR)
|
---|
60 | VBoxWindowsAdditions.rc_DEPS += $(VBoxWindowsAdditions_0_OUTDIR)/VBoxWindowsAdditions-icon.rc
|
---|
61 | VBoxWindowsAdditions.rc_CLEAN = $(VBoxWindowsAdditions_0_OUTDIR)/VBoxWindowsAdditions-icon.rc
|
---|
62 |
|
---|
63 |
|
---|
64 | # Icon include file.
|
---|
65 | $$(VBoxWindowsAdditions_0_OUTDIR)/VBoxWindowsAdditions-icon.rc: \
|
---|
66 | $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
67 | $(RM) -f $@
|
---|
68 | $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
|
---|
69 |
|
---|
70 |
|
---|
71 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
72 |
|
---|