VirtualBox

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

Last change on this file since 39885 was 39885, checked in by vboxsync, 13 years ago

Main/cbindings: update XPCOM C bindings again

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# $Id: Makefile.kmk 39885 2012-01-26 15:02:48Z vboxsync $
2## @file
3# Sub-Makefile for the VBox C Binding.
4#
5
6#
7# Copyright (C) 2009-2012 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
22if defined(VBOX_WITH_XPCOM) || defined(VBOX_ONLY_SDK)
23#
24# The samples
25#
26INSTALLS += XpComCSamples
27XpComCSamples_MODE = a+r,u+rw
28XpComCSamples_INST = \
29 $(INST_SDK)bindings/xpcom/cbinding/samples/
30XpComCSamples_SOURCES = \
31 tstXPCOMCGlue.c \
32 tstXPCOMCCall.c \
33 makefile.tstXPCOMCGlue=>Makefile
34
35INSTALLS += XpComCGlue
36XpComCGlue_MODE = a+r,u+rw
37XpComCGlue_INST = \
38 $(INST_SDK)bindings/xpcom/cbinding/
39XpComCGlue_SOURCES = \
40 VBoxXPCOMCGlue.c \
41 VBoxXPCOMCGlue.h
42
43INSTALLS += XpComCHeaders
44XpComCHeaders_MODE = a+r,u+rw
45XpComCHeaders_INST = $(INST_SDK)bindings/xpcom/include/
46XpComCHeaders_SOURCES = \
47 VBoxCAPI_v2_2.h \
48 VBoxCAPI_v3_0.h \
49 VBoxCAPI_v3_1.h \
50 VBoxCAPI_v3_2.h \
51 VBoxCAPI_v4_0.h \
52 VBoxCAPI_v4_1.h \
53 $(XpComCHeaders_0_OUTDIR)/VBoxCAPI_v$(VBOX_API_VERSION).h
54
55$$(XpComCHeaders_0_OUTDIR)/VBoxCAPI_v$(VBOX_API_VERSION).h: \
56 $(PATH_SUB_CURRENT)/xpcidl.xsl \
57 $(VBOX_XIDL_FILE) \
58 | $$(dir $$@)
59 $(call MSG_TOOL,xsltproc,XpComCHeaders,$<,$@)
60 $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
61
62endif # VBOX_WITH_XPCOM || SDK
63if !defined(VBOX_ONLY_SDK) && defined(VBOX_WITH_XPCOM)
64
65 #
66 # The C utility DLL
67 #
68 ifdef VBOX_WITH_XPCOM
69 DLLS += VBoxXPCOMC
70 VBoxXPCOMC_TEMPLATE = VBOXMAINDLL
71 VBoxXPCOMC_DEFS = IN_VBOXXPCOMC
72 VBoxXPCOMC_SOURCES = \
73 VBoxXPCOMC.cpp
74 VBoxXPCOMC_INTERMEDIATES = \
75 $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v$(VBOX_API_VERSION).h
76 endif
77
78 #
79 # The C glue library.
80 #
81 LIBRARIES += VBoxXPCOMCGlue
82 VBoxXPCOMCGlue_TEMPLATE = VBOXMAINEXE
83 VBoxXPCOMCGlue_DEFS = IN_VBOXXPCOMC
84 VBoxXPCOMCGlue_SOURCES = \
85 VBoxXPCOMCGlue.c
86 VBoxXPCOMCGlue_INTERMEDIATES = \
87 $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v$(VBOX_API_VERSION).h
88
89 if defined(VBOX_WITH_TESTCASES) && "$(KBUILD_TARGET)" != "darwin"
90 #
91 # The testcase (also in samples).
92 # C testcase using the dynamic glue.
93 #
94 PROGRAMS += tstXPCOMCGlue
95 tstXPCOMCGlue_TEMPLATE = VBOXR3EXE
96 tstXPCOMCGlue_INCS = \
97 $(VBOX_PATH_SDK)/bindings/xpcom/include
98 tstXPCOMCGlue_INTERMEDIATES = \
99 $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v$(VBOX_API_VERSION).h
100 tstXPCOMCGlue_SOURCES = \
101 tstXPCOMCGlue.c
102 tstXPCOMCGlue_LIBS = \
103 $(VBoxXPCOMCGlue_1_TARGET)
104
105 ifeq (disabled,1)
106 #
107 # The callback testcase.
108 #
109 PROGRAMS += tstXPCOMCCall
110 tstXPCOMCCall_TEMPLATE = VBOXR3EXE
111 tstXPCOMCCall_INCS = \
112 $(VBOX_PATH_SDK)/bindings/xpcom/include
113 tstXPCOMCCall_INTERMEDIATES = \
114 $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v$(VBOX_API_VERSION).h
115 tstXPCOMCCall_SOURCES = \
116 tstXPCOMCCall.c
117 tstXPCOMCCall_LIBS = \
118 $(VBoxXPCOMCGlue_1_TARGET)
119 endif
120 endif
121
122endif # ! VBOX_ONLY_SDK
123
124# generate rules.
125include $(KBUILD_PATH)/subfooter.kmk
126
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