1 | # $Id: Makefile.kmk 99692 2023-05-09 09:31:21Z 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 |
|
---|
49 | #
|
---|
50 | # Parfait fails with an error that ../../../../MacOS can't be accessed while standard clang has no problem with it.
|
---|
51 | # As we don't want to run the output just omit the -rpath arguments to make it build
|
---|
52 | #
|
---|
53 | ifndef VBOX_WITH_PARFAIT
|
---|
54 | VBoxIntNetSwitch_LDFLAGS.darwin = \
|
---|
55 | -rpath @executable_path/../../../../MacOS
|
---|
56 | endif
|
---|
57 |
|
---|
58 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
59 | INSTALLS += VBoxIntNetSwitch.xpc
|
---|
60 |
|
---|
61 | VBoxIntNetSwitch.xpc_MODE = 644
|
---|
62 | VBoxIntNetSwitch.xpc_INST = $(INST_VIRTUALBOX)Contents/XPCServices/org.virtualbox.intnet.xpc/Contents/
|
---|
63 | VBoxIntNetSwitch.xpc_SOURCES = \
|
---|
64 | $(VBoxIntNetSwitch.xpc_0_OUTDIR)/Info.plist
|
---|
65 |
|
---|
66 | $$(VBoxIntNetSwitch.xpc_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
|
---|
67 | $(call MSG_GENERATE,VBoxIntNetSwitch.xpc,$<,$@)
|
---|
68 | $(QUIET)$(RM) -f $@
|
---|
69 | $(QUIET)$(SED) \
|
---|
70 | -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \
|
---|
71 | -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \
|
---|
72 | -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \
|
---|
73 | -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \
|
---|
74 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
75 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
76 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
77 | $< > $@
|
---|
78 | endif
|
---|
79 |
|
---|
80 | $(call VBOX_SET_VER_INFO_EXE,VBoxIntNetSwitch,VirtualBox Internal Network Switch,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
81 |
|
---|
82 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|