e35c08abac84f41e085b0363e18562911434eec2vboxsync# $Id$
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync## @file
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# Sub-Makefile for the VBox C Binding.
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync#
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync#
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# Copyright (C) 2009-2014 Oracle Corporation
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync#
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# available from http://www.virtualbox.org. This file is free software;
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# you can redistribute it and/or modify it under the terms of the GNU
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# General Public License (GPL) as published by the Free Software
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync#
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsyncSUB_DEPTH = ../../../..
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync#
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# The samples
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync#
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncINSTALLS += CAPISamples
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPISamples_MODE = a+r,u+rw
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPISamples_INST = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(INST_SDK)bindings/c/samples/
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPISamples_SOURCES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue.c \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync makefile.tstCAPIGlue=>Makefile
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncINSTALLS += CAPIGlue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPIGlue_MODE = a+r,u+rw
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPIGlue_INST = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(INST_SDK)bindings/c/glue/
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPIGlue_SOURCES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue.c \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h
1c7fb1d12c92bbfa073ed7dfd79b983850e15912vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncINSTALLS += CAPIHeaders
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPIHeaders_MODE = a+r,u+rw
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPIHeaders_INST = $(INST_SDK)bindings/c/include/
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPIHeaders_SOURCES = \
182cfd02df76f20daa4f99d0d11b0540e909bf9avboxsync VBoxCAPI_v2_2.h \
d5394fe0f23c68000abf1ad12fe03e0a7b119685vboxsync VBoxCAPI_v3_0.h \
54ea8aa4ce07c1cb87a069d98159e9afbf3afc30vboxsync VBoxCAPI_v3_1.h \
0fc1d427deb2fbaae5979acc4afed032018aac7evboxsync VBoxCAPI_v3_2.h \
0fc1d427deb2fbaae5979acc4afed032018aac7evboxsync VBoxCAPI_v4_0.h \
0fc1d427deb2fbaae5979acc4afed032018aac7evboxsync VBoxCAPI_v4_1.h \
180d75c44949a43d3a0780eea8a4d1ae8a96d87fvboxsync VBoxCAPI_v4_2.h \
4ce913f948f70579f020c0e3f5f6bd46727abfe6vboxsync VBoxCAPI_v4_3.h \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h=>VBoxCAPI_v$(VBOX_API_VERSION).h
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync$$(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h: \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(PATH_SUB_CURRENT)/VBoxCAPIGlue.h.in \
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync $(MAKEFILE_CURRENT) \
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync | $$(dir $$@)
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync $(call MSG_GENERATE,,$@)
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync $(QUIET)$(SED) \
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync -e 's/@VBOX_API_VERSION@/$(VBOX_API_VERSION)/' \
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync < $< > $@
d454a4558545f9fa1bf18c9a41a1f011fc305a4bvboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync$$(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h: \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(PATH_SUB_CURRENT)/capiidl.xsl \
5b62bb68cac28e42459b244594122071dccb0c77vboxsync $(PATH_SUB_CURRENT)/../idl/typemap-shared.inc.xsl \
33b5e655c06292a07370c8cf4207da691806a7e4vboxsync $(VBOX_XIDL_FILE) \
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync | $$(dir $$@)
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(call MSG_TOOL,xsltproc,CAPIHeaders,$<,$@)
b14adf99ecd1c5a015bf38d3f84116b489db21d7vboxsync $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncif !defined(VBOX_ONLY_SDK)
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync #
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync # The C API binding utility DLL
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync #
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync DLLS += VBoxCAPI
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI_TEMPLATE = VBOXMAINCLIENTDLL
3e8a029da170ccd46db1dedcba7034b38078a82avboxsync ifdef VBOX_WITH_XPCOM
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync # Keep old name on XPCOM so that legacy code is happy.
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI_INST = $(INST_BIN)VBoxXPCOMC$(VBOX_SUFF_DLL)
3e8a029da170ccd46db1dedcba7034b38078a82avboxsync endif
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI_DEFS = IN_VBOXCAPI
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI_SOURCES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI.cpp
33061909a66d118a0a4fde9c6ce7b37e88529d92vboxsync VBoxCAPI_SOURCES.win = \
33061909a66d118a0a4fde9c6ce7b37e88529d92vboxsync VBoxCAPI.rc
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI_INCS = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CAPIHeaders_0_OUTDIR)
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPI_INTERMEDIATES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
a251e09c45654264f660f69396b08b38e813efb9vboxsync #
a251e09c45654264f660f69396b08b38e813efb9vboxsync # The C glue library.
a251e09c45654264f660f69396b08b38e813efb9vboxsync #
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync LIBRARIES += VBoxCAPIGlue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_TEMPLATE = VBOXMAINEXE
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_DEFS = IN_VBOXCAPI
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_SOURCES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync ifdef VBOX_WITH_XPCOM
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_SOURCES += \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/xpcom/lib/VirtualBox_i.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync else
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_SOURCES += \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync endif
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_INCS = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/include \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/glue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync VBoxCAPIGlue_INTERMEDIATES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/glue/VBoxCAPIGlue.h \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/include/VBoxCAPI_v$(VBOX_API_VERSION).h
a251e09c45654264f660f69396b08b38e813efb9vboxsync
033efef0382cea80df31360b44deb8ecf0a32797vboxsync if defined(VBOX_WITH_TESTCASES) && "$(KBUILD_TARGET)" != "darwin"
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync #
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync # The testcase (also in samples).
4c6a62982e10f932ad80cd99f45f244e1b349273vboxsync # C testcase using the dynamic glue.
4c6a62982e10f932ad80cd99f45f244e1b349273vboxsync #
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync PROGRAMS += tstCAPIGlue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_TEMPLATE = VBOXR3TSTEXE
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_INCS = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/include \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/glue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync ifdef VBOX_WITH_XPCOM
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_INCS += \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/xpcom/include
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync else
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_INCS += \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/mscom/include
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync endif
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_INTERMEDIATES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBOX_PATH_SDK)/bindings/c/glue/VBoxCAPIGlue.h \
3873d933902271d7b49889cc2d4f9666d5671e0bvboxsync $(VBOX_PATH_SDK)/bindings/c/include/VBoxCAPI_v$(VBOX_API_VERSION).h \
3873d933902271d7b49889cc2d4f9666d5671e0bvboxsync $(if-expr !defined(VBOX_WITH_XPCOM),$(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h,)
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_SOURCES = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync tstCAPIGlue_LIBS = \
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(VBoxCAPIGlue_1_TARGET)
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync endif
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsyncendif # ! VBOX_ONLY_SDK
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync# generate rules.
772269936494ffaddd0750ba9e28e805ba81398cvboxsyncinclude $(FILE_KBUILD_SUB_FOOTER)
659ccabad889fa6a1851dd1e34a5acce0daff787vboxsync