1 | # $Id: Makefile.kmk 98128 2023-01-19 02:02:24Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-makefile for the Ring-3 based network switch process.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2022-2023 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 | # The internal network switch module.
|
---|
33 | #
|
---|
34 | PROGRAMS += VBoxIntNetSwitch
|
---|
35 | VBoxIntNetSwitch_TEMPLATE := VBoxR3Exe
|
---|
36 |
|
---|
37 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
38 | VBoxIntNetSwitch_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
|
---|
39 | else
|
---|
40 | VBoxIntNetSwitch_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
|
---|
41 | endif
|
---|
42 | VBoxIntNetSwitch_DEFS += VBOX_WITH_INTNET_SERVICE_IN_R3
|
---|
43 | VBoxIntNetSwitch_INST.darwin = $(VBoxIntNetSwitch.xpc_INST)/MacOS/
|
---|
44 | VBoxIntNetSwitch_SOURCES = \
|
---|
45 | VBoxIntNetSwitch.cpp \
|
---|
46 | SrvIntNetWrapper.cpp
|
---|
47 | VBoxIntNetSwitch_LIBS = $(LIB_RUNTIME)
|
---|
48 | VBoxIntNetSwitch_LDFLAGS.darwin = \
|
---|
49 | -rpath @executable_path/../../../../MacOS
|
---|
50 |
|
---|
51 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
52 | INSTALLS += VBoxIntNetSwitch.xpc
|
---|
53 |
|
---|
54 | VBoxIntNetSwitch.xpc_MODE = 644
|
---|
55 | VBoxIntNetSwitch.xpc_INST = $(INST_VIRTUALBOX)Contents/XPCServices/org.virtualbox.intnet.xpc/Contents/
|
---|
56 | VBoxIntNetSwitch.xpc_SOURCES = \
|
---|
57 | $(VBoxIntNetSwitch.xpc_0_OUTDIR)/Info.plist
|
---|
58 |
|
---|
59 | $$(VBoxIntNetSwitch.xpc_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
60 | $(call MSG_GENERATE,VBoxIntNetSwitch.xpc,$<,$@)
|
---|
61 | $(QUIET)$(RM) -f $@
|
---|
62 | $(QUIET)$(SED) \
|
---|
63 | -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \
|
---|
64 | -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \
|
---|
65 | -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \
|
---|
66 | -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \
|
---|
67 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
68 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
69 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
70 | $< > $@
|
---|
71 | endif
|
---|
72 |
|
---|
73 | $(call VBOX_SET_VER_INFO_EXE,VBoxIntNetSwitch,VirtualBox Internal Network Switch,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
74 |
|
---|
75 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|