summaryrefslogtreecommitdiffstats
path: root/src/bldprogs/Makefile.kmk
blob: 613685fdeb9a6933b93c2e65633aeb34b1cc44a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# $Id: Makefile.kmk $
## @file
# Sub-Makefile for various generic build tools (there is currently only one of them).
#

#
# Copyright (C) 2006-2022 Oracle and/or its affiliates.
#
# This file is part of VirtualBox base platform packages, as
# available from https://www.virtualbox.org.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, in version 3 of the
# License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses>.
#
# SPDX-License-Identifier: GPL-3.0-only
#

SUB_DEPTH = ../..
include $(KBUILD_PATH)/subheader.kmk

BLDPROGS += bin2c
ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.sparc64)
 BLDPROGS += biossums filesplitter genalias VBoxCmp
endif

bin2c_TEMPLATE = VBoxBldProg
bin2c_SOURCES = bin2c.c

biossums_TEMPLATE = VBoxBldProg
biossums_SOURCES = biossums.c

filesplitter_TEMPLATE = VBoxBldProg
filesplitter_SOURCES = filesplitter.cpp

genalias_TEMPLATE = VBoxBldProg
genalias_SOURCES = genalias.cpp

VBoxCmp_TEMPLATE = VBoxBldProg
VBoxCmp_SOURCES = VBoxCmp.cpp

ifndef VBOX_ONLY_BUILD
 PROGRAMS += scm
 scm_TEMPLATE = VBoxR3Tool
 scm_SOURCES = \
 	scm.cpp \
 	scmdiff.cpp \
 	scmrw.cpp \
       scmparser.cpp \
 	scmstream.cpp \
 	scmsubversion.cpp
 ifdef VBOX_PATH_SUBVERSION_INCS
  scm_INCS += $(VBOX_PATH_SUBVERSION_INCS) $(VBOX_PATH_APACHE_RUNTIME_INCS)
  scm_DEFS += SCM_WITH_SVN_HEADERS
 endif

 BLDPROGS += VBoxCPP
 VBoxCPP_TEMPLATE = VBoxAdvBldProg
 VBoxCPP_SOURCES = \
 	VBoxCPP.cpp \
 	scmstream.cpp
endif

if !defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_EXTPACKS)
 BLDPROGS += VBoxTpG
 VBoxTpG_TEMPLATE = VBoxAdvBldProg
 VBoxTpG_SOURCES = \
 	VBoxTpG.cpp \
 	scmstream.cpp
endif

ifeq ($(KBUILD_TARGET),win)
 BLDPROGS += VBoxPeSetVersion
endif
VBoxPeSetVersion_TEMPLATE = VBoxBldProg
VBoxPeSetVersion_SOURCES  = VBoxPeSetVersion.cpp

BLDPROGS.win += VBoxCheckImports
VBoxCheckImports_TEMPLATE = VBoxBldProg
VBoxCheckImports_SOURCES  = VBoxCheckImports.cpp

ifneq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.sparc64)
 BLDPROGS += VBoxDef2LazyLoad
endif
VBoxDef2LazyLoad_TEMPLATE = VBoxBldProg
VBoxDef2LazyLoad_SOURCES  = VBoxDef2LazyLoad.cpp

ifeq ($(KBUILD_TARGET),win)
 BLDPROGS += VBoxEditCoffLib
endif
VBoxEditCoffLib_TEMPLATE = VBoxBldProg
VBoxEditCoffLib_SOURCES  = VBoxEditCoffLib.cpp

# temp hack.
VBoxCompilerPlugInsGcc.o VBoxCompilerPlugInsCommon.o VBoxCompilerPlugIns.o gccplugin: gccplugin$(SUFF_DLL)
gccplugin$(SUFF_DLL): VBoxCompilerPlugInsGcc.cpp VBoxCompilerPlugInsCommon.cpp VBoxCompilerPlugIns.h
	$(TOOL_GXX3_CXX) -shared -fPIC -fno-rtti -g \
		-DIN_RING3 \
		$(if-expr "$(KBUILD_TYPE)" != "release",-DDEBUG,) \
		-I$(shell $(TOOL_GXX3_CXX) -print-file-name=plugin)/include \
		-I$(PATH_ROOT)/include \
		$(if-expr "$(KBUILD_HOST)" == "solaris", -I/usr/include/gmp -I$(PATH_ROOT)/src/bldprogs/solgcc/,) \
		-o $@ \
		VBoxCompilerPlugInsGcc.cpp \
		VBoxCompilerPlugInsCommon.cpp

include $(FILE_KBUILD_SUB_FOOTER)