1 | # $Id: Makefile.kmk 96040 2022-08-04 22:00:57Z 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 Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | ifneq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.sparc64)
|
---|
22 | BLDPROGS += bin2c biossums filesplitter genalias VBoxCmp
|
---|
23 | endif
|
---|
24 |
|
---|
25 | bin2c_TEMPLATE = VBoxBldProg
|
---|
26 | bin2c_SOURCES = bin2c.c
|
---|
27 |
|
---|
28 | biossums_TEMPLATE = VBoxBldProg
|
---|
29 | biossums_SOURCES = biossums.c
|
---|
30 |
|
---|
31 | filesplitter_TEMPLATE = VBoxBldProg
|
---|
32 | filesplitter_SOURCES = filesplitter.cpp
|
---|
33 |
|
---|
34 | genalias_TEMPLATE = VBoxBldProg
|
---|
35 | genalias_SOURCES = genalias.cpp
|
---|
36 |
|
---|
37 | VBoxCmp_TEMPLATE = VBoxBldProg
|
---|
38 | VBoxCmp_SOURCES = VBoxCmp.cpp
|
---|
39 |
|
---|
40 | ifndef VBOX_ONLY_BUILD
|
---|
41 | PROGRAMS += scm
|
---|
42 | scm_TEMPLATE = VBoxR3Tool
|
---|
43 | scm_SOURCES = \
|
---|
44 | scm.cpp \
|
---|
45 | scmdiff.cpp \
|
---|
46 | scmrw.cpp \
|
---|
47 | scmparser.cpp \
|
---|
48 | scmstream.cpp \
|
---|
49 | scmsubversion.cpp
|
---|
50 | ifdef VBOX_PATH_SUBVERSION_INCS
|
---|
51 | scm_INCS += $(VBOX_PATH_SUBVERSION_INCS) $(VBOX_PATH_APACHE_RUNTIME_INCS)
|
---|
52 | scm_DEFS += SCM_WITH_SVN_HEADERS
|
---|
53 | endif
|
---|
54 |
|
---|
55 | BLDPROGS += VBoxCPP
|
---|
56 | VBoxCPP_TEMPLATE = VBoxAdvBldProg
|
---|
57 | VBoxCPP_SOURCES = \
|
---|
58 | VBoxCPP.cpp \
|
---|
59 | scmstream.cpp
|
---|
60 | endif
|
---|
61 |
|
---|
62 | if !defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_EXTPACKS)
|
---|
63 | BLDPROGS += VBoxTpG
|
---|
64 | VBoxTpG_TEMPLATE = VBoxAdvBldProg
|
---|
65 | VBoxTpG_SOURCES = \
|
---|
66 | VBoxTpG.cpp \
|
---|
67 | scmstream.cpp
|
---|
68 | endif
|
---|
69 |
|
---|
70 | ifeq ($(KBUILD_TARGET),win)
|
---|
71 | BLDPROGS += VBoxPeSetVersion
|
---|
72 | endif
|
---|
73 | VBoxPeSetVersion_TEMPLATE = VBoxBldProg
|
---|
74 | VBoxPeSetVersion_SOURCES = VBoxPeSetVersion.cpp
|
---|
75 |
|
---|
76 | BLDPROGS.win += VBoxCheckImports
|
---|
77 | VBoxCheckImports_TEMPLATE = VBoxBldProg
|
---|
78 | VBoxCheckImports_SOURCES = VBoxCheckImports.cpp
|
---|
79 |
|
---|
80 | ifneq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.sparc64)
|
---|
81 | BLDPROGS += VBoxDef2LazyLoad
|
---|
82 | endif
|
---|
83 | VBoxDef2LazyLoad_TEMPLATE = VBoxBldProg
|
---|
84 | VBoxDef2LazyLoad_SOURCES = VBoxDef2LazyLoad.cpp
|
---|
85 |
|
---|
86 | ifeq ($(KBUILD_TARGET),win)
|
---|
87 | BLDPROGS += VBoxEditCoffLib
|
---|
88 | endif
|
---|
89 | VBoxEditCoffLib_TEMPLATE = VBoxBldProg
|
---|
90 | VBoxEditCoffLib_SOURCES = VBoxEditCoffLib.cpp
|
---|
91 |
|
---|
92 | # temp hack.
|
---|
93 | VBoxCompilerPlugInsGcc.o VBoxCompilerPlugInsCommon.o VBoxCompilerPlugIns.o gccplugin: gccplugin$(SUFF_DLL)
|
---|
94 | gccplugin$(SUFF_DLL): VBoxCompilerPlugInsGcc.cpp VBoxCompilerPlugInsCommon.cpp VBoxCompilerPlugIns.h
|
---|
95 | $(TOOL_GXX3_CXX) -shared -fPIC -fno-rtti -g \
|
---|
96 | -DIN_RING3 \
|
---|
97 | $(if-expr "$(KBUILD_TYPE)" != "release",-DDEBUG,) \
|
---|
98 | -I$(shell $(TOOL_GXX3_CXX) -print-file-name=plugin)/include \
|
---|
99 | -I$(PATH_ROOT)/include \
|
---|
100 | $(if-expr "$(KBUILD_HOST)" == "solaris", -I/usr/include/gmp -I$(PATH_ROOT)/src/bldprogs/solgcc/,) \
|
---|
101 | -o $@ \
|
---|
102 | VBoxCompilerPlugInsGcc.cpp \
|
---|
103 | VBoxCompilerPlugInsCommon.cpp
|
---|
104 |
|
---|
105 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
106 |
|
---|