1 | # $Id: Makefile.kmk 19728 2009-05-15 11:52:49Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox C Binding.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
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 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 |
|
---|
26 | if defined(VBOX_WITH_XPCOM) || defined(VBOX_ONLY_SDK)
|
---|
27 | #
|
---|
28 | # The samples
|
---|
29 | #
|
---|
30 | INSTALLS += XpComCSamples
|
---|
31 | XpComCSamples_MODE = a+r,u+rw
|
---|
32 | XpComCSamples_INST = \
|
---|
33 | $(INST_SDK)bindings/xpcom/cbinding/samples/
|
---|
34 | XpComCSamples_SOURCES = \
|
---|
35 | tstXPCOMCGlue.c \
|
---|
36 | tstXPCOMCCall.c \
|
---|
37 | makefile.tstXPCOMCGlue=>Makefile
|
---|
38 |
|
---|
39 | INSTALLS += XpComCGlue
|
---|
40 | XpComCGlue_MODE = a+r,u+rw
|
---|
41 | XpComCGlue_INST = \
|
---|
42 | $(INST_SDK)bindings/xpcom/cbinding/
|
---|
43 | XpComCGlue_SOURCES = \
|
---|
44 | VBoxXPCOMCGlue.c \
|
---|
45 | VBoxXPCOMCGlue.h
|
---|
46 |
|
---|
47 | INSTALLS += XpComCHeaders
|
---|
48 | XpComCHeaders_MODE = a+r,u+rw
|
---|
49 | XpComCHeaders_INST = $(INST_SDK)bindings/xpcom/include/
|
---|
50 | XpComCHeaders_SOURCES = \
|
---|
51 | VBoxCAPI_v2_2.h \
|
---|
52 | $(XpComCHeaders_0_OUTDIR)/VBoxCAPI_v2_5.h
|
---|
53 |
|
---|
54 | $$(XpComCHeaders_0_OUTDIR)/VBoxCAPI_v2_5.h: \
|
---|
55 | $(PATH_SUB_CURRENT)/xpcidl.xsl \
|
---|
56 | $(VBOX_XIDL_FILE) \
|
---|
57 | | $$(dir $$@)
|
---|
58 | $(VBOX_XSLTPROC) -o $@ $^
|
---|
59 |
|
---|
60 | endif # VBOX_WITH_XPCOM || SDK
|
---|
61 | if !defined(VBOX_ONLY_SDK) && defined(VBOX_WITH_XPCOM)
|
---|
62 |
|
---|
63 | #
|
---|
64 | # The C utility DLL
|
---|
65 | #
|
---|
66 | ifdef VBOX_WITH_XPCOM
|
---|
67 | DLLS += VBoxXPCOMC
|
---|
68 | VBoxXPCOMC_TEMPLATE = VBOXMAINDLL
|
---|
69 | VBoxXPCOMC_DEFS = IN_VBOXXPCOMC
|
---|
70 | VBoxXPCOMC_SOURCES = \
|
---|
71 | VBoxXPCOMC.cpp
|
---|
72 | VBoxXPCOMC_INTERMEDIATES = \
|
---|
73 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v2_5.h
|
---|
74 | endif
|
---|
75 |
|
---|
76 | #
|
---|
77 | # The C glue library.
|
---|
78 | #
|
---|
79 | LIBRARIES += VBoxXPCOMCGlue
|
---|
80 | VBoxXPCOMCGlue_TEMPLATE = VBOXMAINEXE
|
---|
81 | VBoxXPCOMCGlue_DEFS = IN_VBOXXPCOMC
|
---|
82 | VBoxXPCOMCGlue_SOURCES = \
|
---|
83 | VBoxXPCOMCGlue.c
|
---|
84 | VBoxXPCOMCGlue_INTERMEDIATES = \
|
---|
85 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v2_5.h
|
---|
86 |
|
---|
87 | if defined(VBOX_WITH_TESTCASES) && "$(KBUILD_TARGET)" != "darwin"
|
---|
88 | #
|
---|
89 | # The testcase (also in samples).
|
---|
90 | # C testcase using the dynamic glue.
|
---|
91 | #
|
---|
92 | PROGRAMS += tstXPCOMCGlue
|
---|
93 | tstXPCOMCGlue_TEMPLATE = VBOXR3EXE
|
---|
94 | tstXPCOMCGlue_INCS = \
|
---|
95 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
96 | tstXPCOMCGlue_INTERMEDIATES = \
|
---|
97 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v2_5.h
|
---|
98 | tstXPCOMCGlue_SOURCES = \
|
---|
99 | tstXPCOMCGlue.c
|
---|
100 | tstXPCOMCGlue_LIBS = \
|
---|
101 | $(VBoxXPCOMCGlue_1_TARGET)
|
---|
102 |
|
---|
103 | ifeq (disabled,1)
|
---|
104 | #
|
---|
105 | # The callback testcase.
|
---|
106 | #
|
---|
107 | PROGRAMS += tstXPCOMCCall
|
---|
108 | tstXPCOMCCall_TEMPLATE = VBOXR3EXE
|
---|
109 | tstXPCOMCCall_INCS = \
|
---|
110 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
111 | tstXPCOMCCall_INTERMEDIATES = \
|
---|
112 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VBoxCAPI_v2_5.h
|
---|
113 | tstXPCOMCCall_SOURCES = \
|
---|
114 | tstXPCOMCCall.c
|
---|
115 | tstXPCOMCCall_LIBS = \
|
---|
116 | $(VBoxXPCOMCGlue_1_TARGET)
|
---|
117 | endif
|
---|
118 | endif
|
---|
119 |
|
---|
120 | endif # ! VBOX_ONLY_SDK
|
---|
121 |
|
---|
122 | # generate rules.
|
---|
123 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
124 |
|
---|