VirtualBox

source: vbox/trunk/src/VBox/Main/cbinding/Makefile.kmk@ 51574

Last change on this file since 51574 was 50858, checked in by vboxsync, 11 years ago

tstCAPIGlue dependency fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1# $Id: Makefile.kmk 50858 2014-03-25 09:51:08Z vboxsync $
2## @file
3# Sub-Makefile for the VBox C Binding.
4#
5
6#
7# Copyright (C) 2009-2014 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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# The samples
24#
25INSTALLS += CAPISamples
26CAPISamples_MODE = a+r,u+rw
27CAPISamples_INST = \
28 $(INST_SDK)bindings/c/samples/
29CAPISamples_SOURCES = \
30 tstCAPIGlue.c \
31 makefile.tstCAPIGlue=>Makefile
32
33INSTALLS += CAPIGlue
34CAPIGlue_MODE = a+r,u+rw
35CAPIGlue_INST = \
36 $(INST_SDK)bindings/c/glue/
37CAPIGlue_SOURCES = \
38 VBoxCAPIGlue.c \
39 $(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h
40
41INSTALLS += CAPIHeaders
42CAPIHeaders_MODE = a+r,u+rw
43CAPIHeaders_INST = $(INST_SDK)bindings/c/include/
44CAPIHeaders_SOURCES = \
45 VBoxCAPI_v2_2.h \
46 VBoxCAPI_v3_0.h \
47 VBoxCAPI_v3_1.h \
48 VBoxCAPI_v3_2.h \
49 VBoxCAPI_v4_0.h \
50 VBoxCAPI_v4_1.h \
51 VBoxCAPI_v4_2.h \
52 $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h=>VBoxCAPI_v$(VBOX_API_VERSION).h
53
54$$(CAPIHeaders_0_OUTDIR)/VBoxCAPIGlue.h: \
55 $(PATH_SUB_CURRENT)/VBoxCAPIGlue.h.in \
56 $(MAKEFILE_CURRENT) \
57 | $$(dir $$@)
58 $(call MSG_GENERATE,,$@)
59 $(QUIET)$(SED) \
60 -e 's/@VBOX_API_VERSION@/$(VBOX_API_VERSION)/' \
61 < $< > $@
62
63$$(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h: \
64 $(PATH_SUB_CURRENT)/capiidl.xsl \
65 $(VBOX_XIDL_FILE) \
66 | $$(dir $$@)
67 $(call MSG_TOOL,xsltproc,CAPIHeaders,$<,$@)
68 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
69
70if !defined(VBOX_ONLY_SDK)
71
72 #
73 # The C API binding utility DLL
74 #
75 DLLS += VBoxCAPI
76 VBoxCAPI_TEMPLATE = VBOXMAINCLIENTDLL
77 ifdef VBOX_WITH_XPCOM
78 # Keep old name on XPCOM so that legacy code is happy.
79 VBoxCAPI_INST = $(INST_BIN)VBoxXPCOMC$(VBOX_SUFF_DLL)
80 endif
81 VBoxCAPI_DEFS = IN_VBOXCAPI
82 VBoxCAPI_SOURCES = \
83 VBoxCAPI.cpp
84 VBoxCAPI_INCS = \
85 $(CAPIHeaders_0_OUTDIR)
86 VBoxCAPI_INTERMEDIATES = \
87 $(CAPIHeaders_0_OUTDIR)/VBoxCAPI.h
88
89 #
90 # The C glue library.
91 #
92 LIBRARIES += VBoxCAPIGlue
93 VBoxCAPIGlue_TEMPLATE = VBOXMAINEXE
94 VBoxCAPIGlue_DEFS = IN_VBOXCAPI
95 VBoxCAPIGlue_SOURCES = \
96 VBoxCAPIGlue.c
97 ifdef VBOX_WITH_XPCOM
98 VBoxCAPIGlue_SOURCES += \
99 $(VBOX_PATH_SDK)/bindings/xpcom/lib/VirtualBox_i.c
100 else
101 VBoxCAPIGlue_SOURCES += \
102 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
103 endif
104 VBoxCAPIGlue_INCS = \
105 $(VBOX_PATH_SDK)/bindings/c/include \
106 $(VBOX_PATH_SDK)/bindings/c/glue
107 VBoxCAPIGlue_INTERMEDIATES = \
108 $(VBOX_PATH_SDK)/bindings/c/glue/VBoxCAPIGlue.h \
109 $(VBOX_PATH_SDK)/bindings/c/include/VBoxCAPI_v$(VBOX_API_VERSION).h
110
111 if defined(VBOX_WITH_TESTCASES) && "$(KBUILD_TARGET)" != "darwin"
112 #
113 # The testcase (also in samples).
114 # C testcase using the dynamic glue.
115 #
116 PROGRAMS += tstCAPIGlue
117 tstCAPIGlue_TEMPLATE = VBOXR3TSTEXE
118 tstCAPIGlue_INCS = \
119 $(VBOX_PATH_SDK)/bindings/c/include \
120 $(VBOX_PATH_SDK)/bindings/c/glue
121 ifdef VBOX_WITH_XPCOM
122 tstCAPIGlue_INCS += \
123 $(VBOX_PATH_SDK)/bindings/xpcom/include
124 else
125 tstCAPIGlue_INCS += \
126 $(VBOX_PATH_SDK)/bindings/mscom/include
127 endif
128 tstCAPIGlue_INTERMEDIATES = \
129 $(VBOX_PATH_SDK)/bindings/c/glue/VBoxCAPIGlue.h \
130 $(VBOX_PATH_SDK)/bindings/c/include/VBoxCAPI_v$(VBOX_API_VERSION).h \
131 $(if-expr !defined(VBOX_WITH_XPCOM),$(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h,)
132 tstCAPIGlue_SOURCES = \
133 tstCAPIGlue.c
134 tstCAPIGlue_LIBS = \
135 $(VBoxCAPIGlue_1_TARGET)
136 endif
137
138endif # ! VBOX_ONLY_SDK
139
140# generate rules.
141include $(FILE_KBUILD_SUB_FOOTER)
142
Note: See TracBrowser for help on using the repository browser.

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