1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# $Id: Makefile.kmk $
## @file
# Sub-Makefile for VBoxRes.dll.
#
#
# Copyright (C) 2010-2022 Oracle and/or its affiliates.
#
# This file is part of VirtualBox base platform packages, as
# available from https://www.virtualbox.org.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, in version 3 of the
# License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses>.
#
# SPDX-License-Identifier: GPL-3.0-only
#
SUB_DEPTH = ../../../../..
include $(KBUILD_PATH)/subheader.kmk
DLLS += VBoxRes
VBoxRes_TEMPLATE = VBoxR3StaticNoCrt
VBoxRes_DEPS = $(VBOX_SVN_REV_KMK)
VBoxRes_LDFLAGS = -NoEntry
VBoxRes_SOURCES = \
dummy.cpp \
VBoxRes.rc
VBoxRes_CLEAN = \
$(VBoxRes_0_OUTDIR)/VBoxRes-icons.rc
# The icon location is configurable.
VBoxRes.rc_INCS += $(VBoxRes_0_OUTDIR)
VBoxRes.rc_DEPS += $(VBoxRes_0_OUTDIR)/VBoxRes-icons.rc
# The resource path.
VBOX_ARTWORK_PATH_WIN := $(subst /,\\,$(PATH_ROOT))/src/VBox/Artwork/win
# Icon include file.
# @todo Put this into Config.kmk?
ifdef VBOX_OSE
# Hack: rc.exe on OSE build boxes don't support Vista icons; so
# use a special icon version (without the 256x256 size) instead.
VBOX_WINDOWS_ICON_EXT_VBOX := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-vbox.ico
VBOX_WINDOWS_ICON_EXT_EXTPACK := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-vbox-extpack.ico
VBOX_WINDOWS_ICON_EXT_OVA := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-ova.ico
VBOX_WINDOWS_ICON_EXT_OVF := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-ovf.ico
VBOX_WINDOWS_ICON_EXT_VDI := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vdi.ico
VBOX_WINDOWS_ICON_EXT_VMDK := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vmdk.ico
VBOX_WINDOWS_ICON_EXT_VHD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vhd.ico
VBOX_WINDOWS_ICON_EXT_HDD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-hdd.ico
else
VBOX_WINDOWS_ICON_EXT_VBOX := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-vbox.ico
VBOX_WINDOWS_ICON_EXT_EXTPACK := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-vbox-extpack.ico
VBOX_WINDOWS_ICON_EXT_OVA := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-ova.ico
VBOX_WINDOWS_ICON_EXT_OVF := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-ovf.ico
VBOX_WINDOWS_ICON_EXT_VDI := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vdi.ico
VBOX_WINDOWS_ICON_EXT_VMDK := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vmdk.ico
VBOX_WINDOWS_ICON_EXT_VHD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vhd.ico
VBOX_WINDOWS_ICON_EXT_HDD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-hdd.ico
endif
VBOX_RESOURCES_WIN := \
$(VBOX_WINDOWS_ICON_FILE) \
$(VBOX_WINDOWS_ICON_EXT_VBOX) \
$(VBOX_WINDOWS_ICON_EXT_EXTPACK) \
$(VBOX_WINDOWS_ICON_EXT_OVA) \
$(VBOX_WINDOWS_ICON_EXT_OVF) \
$(VBOX_WINDOWS_ICON_EXT_VDI) \
$(VBOX_WINDOWS_ICON_EXT_VMDK) \
$(VBOX_WINDOWS_ICON_EXT_VHD) \
$(VBOX_WINDOWS_ICON_EXT_HDD)
$$(VBoxRes_0_OUTDIR)/VBoxRes-icons.rc: \
$$(VBOX_RESOURCES_WIN) $(MAKEFILE_CURRENT) | $$(dir $$@)
$(RM) -f $@
$(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VBOX))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_EXTPACK ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_EXTPACK))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_OVA ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_OVA))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_OVF ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_OVF))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_VDI ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VDI))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_VMDK ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VMDK))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_VHD ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VHD))"'
$(APPEND) $@ 'IDI_FILETYPE_VBOX_HDD ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_HDD))"'
include $(FILE_KBUILD_SUB_FOOTER)
|