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