diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:17:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:17:27 +0000 |
commit | f215e02bf85f68d3a6106c2a1f4f7f063f819064 (patch) | |
tree | 6bb5b92c046312c4e95ac2620b10ddf482d3fa8b /src/VBox/Main/cbinding/Makefile.kmk | |
parent | Initial commit. (diff) | |
download | virtualbox-f215e02bf85f68d3a6106c2a1f4f7f063f819064.tar.xz virtualbox-f215e02bf85f68d3a6106c2a1f4f7f063f819064.zip |
Adding upstream version 7.0.14-dfsg.upstream/7.0.14-dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Main/cbinding/Makefile.kmk')
-rw-r--r-- | src/VBox/Main/cbinding/Makefile.kmk | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/src/VBox/Main/cbinding/Makefile.kmk b/src/VBox/Main/cbinding/Makefile.kmk new file mode 100644 index 00000000..7f45b28c --- /dev/null +++ b/src/VBox/Main/cbinding/Makefile.kmk @@ -0,0 +1,158 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the VBox C Binding. +# + +# +# Copyright (C) 2009-2023 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 + + +# +# The samples +# +INSTALLS += CAPISamples +CAPISamples_MODE = a+r,u+rw +CAPISamples_INST = \ + $(INST_SDK)bindings/c/samples/ +CAPISamples_SOURCES = \ + tstCAPIGlue.c \ + makefile.tstCAPIGlue=>Makefile + +# +# The ???. +# +INSTALLS += CAPIGlue +CAPIGlue_MODE = a+r,u+rw +CAPIGlue_INST = \ + $(INST_SDK)bindings/c/glue/ +CAPIGlue_SOURCES = \ + VBoxCAPIGlue.c \ + $(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h +CAPIGlue_CLEAN = \ + $(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h + +$$(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h: \ + $(PATH_SUB_CURRENT)/VBoxCAPIGlue.h.in \ + $(MAKEFILE_CURRENT) \ + | $$(dir $$@) + $(call MSG_GENERATE,,$@) + $(QUIET)$(SED) \ + -e 's/@VBOX_API_VERSION@/$(VBOX_API_VERSION)/' \ + < $< > $@ + +# +# The ???. +# +INSTALLS += CAPIHeaders +CAPIHeaders_MODE = a+r,u+rw +CAPIHeaders_INST = $(INST_SDK)bindings/c/include/ +CAPIHeaders_SOURCES = \ + $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h=>VBoxCAPI_v$(VBOX_API_VERSION).h +CAPIHeaders_CLEAN = \ + $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h + +$$(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h: \ + $(PATH_SUB_CURRENT)/capiidl.xsl \ + $(PATH_SUB_CURRENT)/../idl/typemap-shared.inc.xsl \ + $(VBOX_XIDL_FILE) \ + | $$(dir $$@) + $(call MSG_TOOL,xsltproc,CAPIHeaders,$<,$@) + $(QUIET)$(VBOX_XSLTPROC) -o $@ $^ + +ifndef VBOX_ONLY_SDK + + # + # The C API binding utility DLL + # + DLLS += VBoxCAPI + VBoxCAPI_TEMPLATE = VBoxMainClientDll + ifdef VBOX_WITH_XPCOM + # Keep old name on XPCOM so that legacy code is happy. + VBoxCAPI_INST = $(INST_BIN)VBoxXPCOMC$(VBOX_SUFF_DLL) + endif + VBoxCAPI_DEFS = IN_VBOXCAPI + VBoxCAPI_SOURCES = \ + VBoxCAPI.cpp + VBoxCAPI_SOURCES.win = \ + VBoxCAPI.rc + VBoxCAPI_INCS = \ + $(CAPIHeaders_0_OUTDIR) + VBoxCAPI_INTERMEDIATES = \ + $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h + + # + # The C glue library. + # + LIBRARIES += VBoxCAPIGlue + VBoxCAPIGlue_TEMPLATE = VBoxMainExe + VBoxCAPIGlue_DEFS = IN_VBOXCAPI + VBoxCAPIGlue_SOURCES = \ + VBoxCAPIGlue.c + ifdef VBOX_WITH_XPCOM + VBoxCAPIGlue_SOURCES += \ + $(VBOX_PATH_SDK)/bindings/xpcom/lib/VirtualBox_i.c + else + VBoxCAPIGlue_SOURCES += \ + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c + endif + VBoxCAPIGlue_INCS = \ + $(VBOX_PATH_SDK)/bindings/c/include \ + $(VBOX_PATH_SDK)/bindings/c/glue + VBoxCAPIGlue_INTERMEDIATES = \ + $(VBOX_PATH_SDK)/bindings/c/glue/VBoxCAPIGlue.h \ + $(VBOX_PATH_SDK)/bindings/c/include/VBoxCAPI_v$(VBOX_API_VERSION).h + + if defined(VBOX_WITH_TESTCASES) && "$(KBUILD_TARGET)" != "darwin" + # + # The testcase (also in samples). + # C testcase using the dynamic glue. + # + PROGRAMS += tstCAPIGlue + tstCAPIGlue_TEMPLATE = VBoxR3TstExe + tstCAPIGlue_INCS = \ + $(VBOX_PATH_SDK)/bindings/c/include \ + $(VBOX_PATH_SDK)/bindings/c/glue + ifdef VBOX_WITH_XPCOM + tstCAPIGlue_INCS += \ + $(VBOX_PATH_SDK)/bindings/xpcom/include + else + tstCAPIGlue_INCS += \ + $(VBOX_PATH_SDK)/bindings/mscom/include + endif + tstCAPIGlue_INTERMEDIATES = \ + $(VBOX_PATH_SDK)/bindings/c/glue/VBoxCAPIGlue.h \ + $(VBOX_PATH_SDK)/bindings/c/include/VBoxCAPI_v$(VBOX_API_VERSION).h \ + $(if-expr !defined(VBOX_WITH_XPCOM),$(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h,) + tstCAPIGlue_SOURCES = \ + tstCAPIGlue.c + tstCAPIGlue_LIBS = \ + $(VBoxCAPIGlue_1_TARGET) + endif + +endif # !VBOX_ONLY_SDK + +# generate rules. +include $(FILE_KBUILD_SUB_FOOTER) + |