[2476] | 1 | # $Id: Makefile.kmk 98374 2023-02-01 09:48:59Z vboxsync $
|
---|
| 2 | ## @file
|
---|
[10182] | 3 | # Sub-Makefile for various generic build tools (there is currently only one of them).
|
---|
[1] | 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[98103] | 7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[5999] | 8 | #
|
---|
[96407] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[5999] | 11 | #
|
---|
[96407] | 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 | #
|
---|
[1] | 27 |
|
---|
[10182] | 28 | SUB_DEPTH = ../..
|
---|
| 29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
[1] | 30 |
|
---|
[96530] | 31 | BLDPROGS += bin2c
|
---|
| 32 | ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.sparc64)
|
---|
| 33 | BLDPROGS += biossums filesplitter genalias VBoxCmp
|
---|
[78452] | 34 | endif
|
---|
[13155] | 35 |
|
---|
[49116] | 36 | bin2c_TEMPLATE = VBoxBldProg
|
---|
[10182] | 37 | bin2c_SOURCES = bin2c.c
|
---|
[1] | 38 |
|
---|
[49116] | 39 | biossums_TEMPLATE = VBoxBldProg
|
---|
[13155] | 40 | biossums_SOURCES = biossums.c
|
---|
| 41 |
|
---|
[49116] | 42 | filesplitter_TEMPLATE = VBoxBldProg
|
---|
[29715] | 43 | filesplitter_SOURCES = filesplitter.cpp
|
---|
| 44 |
|
---|
[96040] | 45 | genalias_TEMPLATE = VBoxBldProg
|
---|
| 46 | genalias_SOURCES = genalias.cpp
|
---|
| 47 |
|
---|
[49116] | 48 | VBoxCmp_TEMPLATE = VBoxBldProg
|
---|
[42048] | 49 | VBoxCmp_SOURCES = VBoxCmp.cpp
|
---|
| 50 |
|
---|
[42269] | 51 | ifndef VBOX_ONLY_BUILD
|
---|
[56332] | 52 | PROGRAMS += scm
|
---|
| 53 | scm_TEMPLATE = VBoxR3Tool
|
---|
[40528] | 54 | scm_SOURCES = \
|
---|
[40549] | 55 | scm.cpp \
|
---|
| 56 | scmdiff.cpp \
|
---|
| 57 | scmrw.cpp \
|
---|
[98374] | 58 | scmrw-kmk.cpp \
|
---|
[69166] | 59 | scmparser.cpp \
|
---|
[40549] | 60 | scmstream.cpp \
|
---|
[40554] | 61 | scmsubversion.cpp
|
---|
[56308] | 62 | ifdef VBOX_PATH_SUBVERSION_INCS
|
---|
| 63 | scm_INCS += $(VBOX_PATH_SUBVERSION_INCS) $(VBOX_PATH_APACHE_RUNTIME_INCS)
|
---|
| 64 | scm_DEFS += SCM_WITH_SVN_HEADERS
|
---|
| 65 | endif
|
---|
[40535] | 66 |
|
---|
[42269] | 67 | BLDPROGS += VBoxCPP
|
---|
| 68 | VBoxCPP_TEMPLATE = VBoxAdvBldProg
|
---|
| 69 | VBoxCPP_SOURCES = \
|
---|
| 70 | VBoxCPP.cpp \
|
---|
| 71 | scmstream.cpp
|
---|
| 72 | endif
|
---|
[40549] | 73 |
|
---|
[42269] | 74 | if !defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_EXTPACKS)
|
---|
[40554] | 75 | BLDPROGS += VBoxTpG
|
---|
[40549] | 76 | VBoxTpG_TEMPLATE = VBoxAdvBldProg
|
---|
| 77 | VBoxTpG_SOURCES = \
|
---|
| 78 | VBoxTpG.cpp \
|
---|
| 79 | scmstream.cpp
|
---|
[26346] | 80 | endif
|
---|
[1] | 81 |
|
---|
[57898] | 82 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 83 | BLDPROGS += VBoxPeSetVersion
|
---|
| 84 | endif
|
---|
[49116] | 85 | VBoxPeSetVersion_TEMPLATE = VBoxBldProg
|
---|
[42239] | 86 | VBoxPeSetVersion_SOURCES = VBoxPeSetVersion.cpp
|
---|
| 87 |
|
---|
[59404] | 88 | BLDPROGS.win += VBoxCheckImports
|
---|
| 89 | VBoxCheckImports_TEMPLATE = VBoxBldProg
|
---|
| 90 | VBoxCheckImports_SOURCES = VBoxCheckImports.cpp
|
---|
| 91 |
|
---|
[78452] | 92 | ifneq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.sparc64)
|
---|
| 93 | BLDPROGS += VBoxDef2LazyLoad
|
---|
| 94 | endif
|
---|
[49116] | 95 | VBoxDef2LazyLoad_TEMPLATE = VBoxBldProg
|
---|
[46474] | 96 | VBoxDef2LazyLoad_SOURCES = VBoxDef2LazyLoad.cpp
|
---|
| 97 |
|
---|
[78608] | 98 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 99 | BLDPROGS += VBoxEditCoffLib
|
---|
| 100 | endif
|
---|
| 101 | VBoxEditCoffLib_TEMPLATE = VBoxBldProg
|
---|
| 102 | VBoxEditCoffLib_SOURCES = VBoxEditCoffLib.cpp
|
---|
| 103 |
|
---|
[56920] | 104 | # temp hack.
|
---|
[56977] | 105 | VBoxCompilerPlugInsGcc.o VBoxCompilerPlugInsCommon.o VBoxCompilerPlugIns.o gccplugin: gccplugin$(SUFF_DLL)
|
---|
| 106 | gccplugin$(SUFF_DLL): VBoxCompilerPlugInsGcc.cpp VBoxCompilerPlugInsCommon.cpp VBoxCompilerPlugIns.h
|
---|
[69076] | 107 | $(TOOL_GXX3_CXX) -shared -fPIC -fno-rtti -g \
|
---|
[56977] | 108 | -DIN_RING3 \
|
---|
| 109 | $(if-expr "$(KBUILD_TYPE)" != "release",-DDEBUG,) \
|
---|
[61209] | 110 | -I$(shell $(TOOL_GXX3_CXX) -print-file-name=plugin)/include \
|
---|
[56977] | 111 | -I$(PATH_ROOT)/include \
|
---|
[57029] | 112 | $(if-expr "$(KBUILD_HOST)" == "solaris", -I/usr/include/gmp -I$(PATH_ROOT)/src/bldprogs/solgcc/,) \
|
---|
[56977] | 113 | -o $@ \
|
---|
| 114 | VBoxCompilerPlugInsGcc.cpp \
|
---|
| 115 | VBoxCompilerPlugInsCommon.cpp
|
---|
[46474] | 116 |
|
---|
[41477] | 117 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
[34484] | 118 |
|
---|