VirtualBox

source: vbox/trunk/src/bldprogs/Makefile.kmk@ 108495

Last change on this file since 108495 was 108495, checked in by vboxsync, 6 weeks ago

bldprogs,Config.kmk,Makefile.kmk: Introduce VBoxEditElf tool to edit ELF binaries. Currently supports deleting and chanign the runpath only, bugref:10874

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1# $Id: Makefile.kmk 108495 2025-03-10 13:00:08Z 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
28SUB_DEPTH = ../..
29include $(KBUILD_PATH)/subheader.kmk
30
31BLDPROGS += bin2c
32ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.sparc64)
33 BLDPROGS += biossums filesplitter genalias VBoxCmp
34endif
35
36bin2c_TEMPLATE = VBoxBldProg
37bin2c_SOURCES = \
38 bin2c.c
39
40biossums_TEMPLATE = VBoxBldProg
41biossums_SOURCES = biossums.c
42
43filesplitter_TEMPLATE = VBoxBldProg
44filesplitter_SOURCES = filesplitter.cpp
45
46genalias_TEMPLATE = VBoxBldProg
47genalias_SOURCES = genalias.cpp
48
49VBoxCmp_TEMPLATE = VBoxBldProg
50VBoxCmp_SOURCES = VBoxCmp.cpp
51
52ifndef 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
73endif
74
75if !defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_EXTPACKS)
76 BLDPROGS += VBoxTpG
77 VBoxTpG_TEMPLATE = VBoxAdvBldProg
78 VBoxTpG_SOURCES = \
79 VBoxTpG.cpp \
80 scmstream.cpp
81endif
82
83ifeq ($(KBUILD_TARGET),win)
84 BLDPROGS += VBoxPeSetVersion
85endif
86VBoxPeSetVersion_TEMPLATE = VBoxBldProg
87VBoxPeSetVersion_SOURCES = VBoxPeSetVersion.cpp
88
89BLDPROGS.win += VBoxCheckImports
90VBoxCheckImports_TEMPLATE = VBoxBldProg
91VBoxCheckImports_SOURCES = VBoxCheckImports.cpp
92
93BLDPROGS += VBoxEditElf
94VBoxEditElf_TEMPLATE = VBoxAdvBldProg
95VBoxEditElf_SOURCES = VBoxEditElf.cpp
96
97ifneq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.sparc64)
98 BLDPROGS += VBoxDef2LazyLoad
99endif
100VBoxDef2LazyLoad_TEMPLATE = VBoxBldProg
101VBoxDef2LazyLoad_DEFS = TARGET_$(toupper $(KBUILD_TARGET_ARCH))
102VBoxDef2LazyLoad_SOURCES = VBoxDef2LazyLoad.cpp
103
104ifeq ($(KBUILD_TARGET),win)
105 BLDPROGS += VBoxEditCoffLib
106endif
107VBoxEditCoffLib_TEMPLATE = VBoxBldProg
108VBoxEditCoffLib_SOURCES = VBoxEditCoffLib.cpp
109
110# temp hack.
111VBoxCompilerPlugInsGcc.o VBoxCompilerPlugInsCommon.o VBoxCompilerPlugIns.o gccplugin: gccplugin$(SUFF_DLL)
112gccplugin$(SUFF_DLL): VBoxCompilerPlugInsGcc.cpp VBoxCompilerPlugInsCommon.cpp VBoxCompilerPlugIns.h
113 $(TOOL_GXX3_CXX) -shared -fPIC -fno-rtti -g \
114 -DIN_RING3 \
115 $(if-expr "$(KBUILD_TYPE)" != "release",-DDEBUG,) \
116 -I$(shell $(TOOL_GXX3_CXX) -print-file-name=plugin)/include \
117 -I$(PATH_ROOT)/include \
118 $(if-expr "$(KBUILD_HOST)" == "solaris", -I/usr/include/gmp -I$(PATH_ROOT)/src/bldprogs/solgcc/,) \
119 -o $@ \
120 VBoxCompilerPlugInsGcc.cpp \
121 VBoxCompilerPlugInsCommon.cpp
122
123include $(FILE_KBUILD_SUB_FOOTER)
124
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette