1 | # $Id: Makefile.kmk 106605 2024-10-23 01:27:57Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for various generic build tools (there is currently only one of them).
|
---|
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 | BLDPROGS += bin2c
|
---|
32 | ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.sparc64)
|
---|
33 | BLDPROGS += biossums filesplitter genalias VBoxCmp
|
---|
34 | endif
|
---|
35 |
|
---|
36 | bin2c_TEMPLATE = VBoxBldProg
|
---|
37 | bin2c_SOURCES = \
|
---|
38 | bin2c.c
|
---|
39 |
|
---|
40 | biossums_TEMPLATE = VBoxBldProg
|
---|
41 | biossums_SOURCES = biossums.c
|
---|
42 |
|
---|
43 | filesplitter_TEMPLATE = VBoxBldProg
|
---|
44 | filesplitter_SOURCES = filesplitter.cpp
|
---|
45 |
|
---|
46 | genalias_TEMPLATE = VBoxBldProg
|
---|
47 | genalias_SOURCES = genalias.cpp
|
---|
48 |
|
---|
49 | VBoxCmp_TEMPLATE = VBoxBldProg
|
---|
50 | VBoxCmp_SOURCES = VBoxCmp.cpp
|
---|
51 |
|
---|
52 | ifndef VBOX_ONLY_BUILD
|
---|
53 | PROGRAMS += scm
|
---|
54 | scm_TEMPLATE = VBoxR3Tool
|
---|
55 | scm_SOURCES = \
|
---|
56 | scm.cpp \
|
---|
57 | scmdiff.cpp \
|
---|
58 | scmrw.cpp \
|
---|
59 | scmrw-kmk.cpp \
|
---|
60 | scmparser.cpp \
|
---|
61 | scmstream.cpp \
|
---|
62 | scmsubversion.cpp
|
---|
63 | ifdef VBOX_PATH_SUBVERSION_INCS
|
---|
64 | scm_INCS += $(VBOX_PATH_SUBVERSION_INCS) $(VBOX_PATH_APACHE_RUNTIME_INCS)
|
---|
65 | scm_DEFS += SCM_WITH_SVN_HEADERS
|
---|
66 | endif
|
---|
67 |
|
---|
68 | BLDPROGS += VBoxCPP
|
---|
69 | VBoxCPP_TEMPLATE = VBoxAdvBldProg
|
---|
70 | VBoxCPP_SOURCES = \
|
---|
71 | VBoxCPP.cpp \
|
---|
72 | scmstream.cpp
|
---|
73 | endif
|
---|
74 |
|
---|
75 | if !defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_EXTPACKS)
|
---|
76 | BLDPROGS += VBoxTpG
|
---|
77 | VBoxTpG_TEMPLATE = VBoxAdvBldProg
|
---|
78 | VBoxTpG_SOURCES = \
|
---|
79 | VBoxTpG.cpp \
|
---|
80 | scmstream.cpp
|
---|
81 | endif
|
---|
82 |
|
---|
83 | ifeq ($(KBUILD_TARGET),win)
|
---|
84 | BLDPROGS += VBoxPeSetVersion
|
---|
85 | endif
|
---|
86 | VBoxPeSetVersion_TEMPLATE = VBoxBldProg
|
---|
87 | VBoxPeSetVersion_SOURCES = VBoxPeSetVersion.cpp
|
---|
88 |
|
---|
89 | BLDPROGS.win += VBoxCheckImports
|
---|
90 | VBoxCheckImports_TEMPLATE = VBoxBldProg
|
---|
91 | VBoxCheckImports_SOURCES = VBoxCheckImports.cpp
|
---|
92 |
|
---|
93 | ifneq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.sparc64)
|
---|
94 | BLDPROGS += VBoxDef2LazyLoad
|
---|
95 | endif
|
---|
96 | VBoxDef2LazyLoad_TEMPLATE = VBoxBldProg
|
---|
97 | VBoxDef2LazyLoad_DEFS = TARGET_$(toupper $(KBUILD_TARGET_ARCH))
|
---|
98 | VBoxDef2LazyLoad_SOURCES = VBoxDef2LazyLoad.cpp
|
---|
99 |
|
---|
100 | ifeq ($(KBUILD_TARGET),win)
|
---|
101 | BLDPROGS += VBoxEditCoffLib
|
---|
102 | endif
|
---|
103 | VBoxEditCoffLib_TEMPLATE = VBoxBldProg
|
---|
104 | VBoxEditCoffLib_SOURCES = VBoxEditCoffLib.cpp
|
---|
105 |
|
---|
106 | # temp hack.
|
---|
107 | VBoxCompilerPlugInsGcc.o VBoxCompilerPlugInsCommon.o VBoxCompilerPlugIns.o gccplugin: gccplugin$(SUFF_DLL)
|
---|
108 | gccplugin$(SUFF_DLL): VBoxCompilerPlugInsGcc.cpp VBoxCompilerPlugInsCommon.cpp VBoxCompilerPlugIns.h
|
---|
109 | $(TOOL_GXX3_CXX) -shared -fPIC -fno-rtti -g \
|
---|
110 | -DIN_RING3 \
|
---|
111 | $(if-expr "$(KBUILD_TYPE)" != "release",-DDEBUG,) \
|
---|
112 | -I$(shell $(TOOL_GXX3_CXX) -print-file-name=plugin)/include \
|
---|
113 | -I$(PATH_ROOT)/include \
|
---|
114 | $(if-expr "$(KBUILD_HOST)" == "solaris", -I/usr/include/gmp -I$(PATH_ROOT)/src/bldprogs/solgcc/,) \
|
---|
115 | -o $@ \
|
---|
116 | VBoxCompilerPlugInsGcc.cpp \
|
---|
117 | VBoxCompilerPlugInsCommon.cpp
|
---|
118 |
|
---|
119 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
120 |
|
---|