1 | # $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for VMM tools.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-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 |
|
---|
32 | #
|
---|
33 | # Targets.
|
---|
34 | #
|
---|
35 | ifdef VBOX_WITH_HARDENING
|
---|
36 | PROGRAMS += VBoxVMMPreloadHardened
|
---|
37 | DLLS += VBoxVMMPreload
|
---|
38 | else
|
---|
39 | PROGRAMS += VBoxVMMPreload
|
---|
40 | endif
|
---|
41 |
|
---|
42 |
|
---|
43 | #
|
---|
44 | # Hardened stub.
|
---|
45 | #
|
---|
46 | VBoxVMMPreloadHardened_TEMPLATE = VBoxR3HardenedExe
|
---|
47 | VBoxVMMPreloadHardened_SOURCES = VBoxVMMPreloadHardened.cpp
|
---|
48 | VBoxVMMPreloadHardened_NAME = VBoxVMMPreload
|
---|
49 |
|
---|
50 |
|
---|
51 | #
|
---|
52 | # The real thing
|
---|
53 | #
|
---|
54 | VBoxVMMPreload_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBoxR3Dll,VBoxR3Exe)
|
---|
55 | VBoxVMMPreload_SOURCES = VBoxVMMPreload.cpp
|
---|
56 | VBoxVMMPreload_LIBS = $(LIB_RUNTIME)
|
---|
57 | ifdef VBOX_WITH_HARDENING
|
---|
58 | VBoxVMMPreload_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMMPreload.dylib
|
---|
59 | endif
|
---|
60 |
|
---|
61 |
|
---|
62 | #
|
---|
63 | # CPU report program (CPUM DB).
|
---|
64 | #
|
---|
65 | if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
|
---|
66 | PROGRAMS += VBoxCpuReport
|
---|
67 | endif
|
---|
68 | VBoxCpuReport_TEMPLATE := VBoxR3Static
|
---|
69 | VBoxCpuReport_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_VBOX_CPU_REPORT $(VMM_COMMON_DEFS)
|
---|
70 | VBoxCpuReport_INCS = ../include
|
---|
71 | VBoxCpuReport_SOURCES = \
|
---|
72 | VBoxCpuReport.cpp \
|
---|
73 | VBoxCpuReportMsrSup.cpp \
|
---|
74 | ../VMMR3/CPUMR3CpuId.cpp \
|
---|
75 | ../VMMAll/CPUMAllCpuId.cpp
|
---|
76 | VBoxCpuReport_SOURCES.linux = \
|
---|
77 | VBoxCpuReportMsrLinux.cpp
|
---|
78 | VBoxCpuReport_DEFS.linux = VBCR_HAVE_PLATFORM_MSR_PROBER
|
---|
79 | VBoxCpuReport_LIBS = \
|
---|
80 | $(PATH_STAGE_LIB)/SUPR3Static$(VBOX_SUFF_LIB) \
|
---|
81 | $(VBOX_LIB_RUNTIME_STATIC)
|
---|
82 | VBoxCpuReport_LIBS.solaris = kstat contract
|
---|
83 |
|
---|
84 | VBoxCpuReport_LDFLAGS.darwin = \
|
---|
85 | -framework IOKit -framework CoreFoundation -framework CoreServices
|
---|
86 |
|
---|
87 |
|
---|
88 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
89 |
|
---|