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