1 | # $Id: Makefile.kmk 17567 2009-03-09 12:11:16Z 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 "$(KBUILD_TARGET)" == "linux" || 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 | tstLinuxC.c \
|
---|
36 | tstdlOpen.c \
|
---|
37 | makefile.tstLinuxC=>Makefile
|
---|
38 |
|
---|
39 | INSTALLS += XpComCHeaders
|
---|
40 | XpComCHeaders_MODE = a+r,u+rw
|
---|
41 | XpComCHeaders_INST = $(INST_SDK)bindings/xpcom/include/
|
---|
42 | XpComCHeaders_SOURCES = \
|
---|
43 | $(XpComCHeaders_0_OUTDIR)/VirtualBox_CXPCOM.h
|
---|
44 |
|
---|
45 | $$(XpComCHeaders_0_OUTDIR)/VirtualBox_CXPCOM.h: \
|
---|
46 | $(PATH_SUB_CURRENT)/xpcidl.xsl \
|
---|
47 | $(VBOX_XIDL_FILE) \
|
---|
48 | | $$(dir $$@)
|
---|
49 | $(VBOX_XSLTPROC) -o $@ $^
|
---|
50 |
|
---|
51 | endif # linux || SDK
|
---|
52 | ifndef VBOX_ONLY_SDK
|
---|
53 |
|
---|
54 | #
|
---|
55 | # The C utility DLL
|
---|
56 | #
|
---|
57 | ifdef VBOX_WITH_XPCOM
|
---|
58 | DLLS += VBoxXPCOMC
|
---|
59 | VBoxXPCOMC_TEMPLATE = VBOXMAINDLL
|
---|
60 | VBoxXPCOMC_DEFS = IN_VBOXXPCOMC
|
---|
61 | VBoxXPCOMC_SOURCES = \
|
---|
62 | VBoxXPCOMC.cpp
|
---|
63 | endif
|
---|
64 |
|
---|
65 | #
|
---|
66 | # The C glue library.
|
---|
67 | #
|
---|
68 | LIBRARIES.linux += VBoxXPCOMCGlue
|
---|
69 | VBoxXPCOMCGlue_TEMPLATE = VBOXMAINEXE
|
---|
70 | VBoxXPCOMCGlue_DEFS = IN_VBOXXPCOMC
|
---|
71 | VBoxXPCOMCGlue_SOURCES = \
|
---|
72 | VBoxXPCOMCGlue.c
|
---|
73 | VBoxXPCOMCGlue_INTERMEDIATES = \
|
---|
74 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_CXPCOM.h
|
---|
75 |
|
---|
76 | ifdef VBOX_WITH_TESTCASES
|
---|
77 | #
|
---|
78 | # The testcase (also in samples).
|
---|
79 | #
|
---|
80 | PROGRAMS.linux += tstXPCOMC
|
---|
81 | tstXPCOMC_TEMPLATE = VBOXR3
|
---|
82 | tstXPCOMC_INCS = \
|
---|
83 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
84 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub
|
---|
85 | tstXPCOMC_INTERMEDIATES = \
|
---|
86 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_CXPCOM.h
|
---|
87 | tstXPCOMC_SOURCES = \
|
---|
88 | tstLinuxC.c
|
---|
89 | tstXPCOMC_LIBS = \
|
---|
90 | $(VBoxXPCOMC_1_TARGET)
|
---|
91 |
|
---|
92 | #
|
---|
93 | # C testcase using the dynamic glue.
|
---|
94 | #
|
---|
95 | PROGRAMS.linux += tstXPCOMCGlue
|
---|
96 | tstXPCOMCGlue_TEMPLATE = VBOXR3
|
---|
97 | tstXPCOMCGlue_INCS = \
|
---|
98 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
99 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub
|
---|
100 | tstXPCOMCGlue_INTERMEDIATES = \
|
---|
101 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_CXPCOM.h
|
---|
102 | tstXPCOMCGlue_SOURCES = \
|
---|
103 | tstXPCOMCGlue.c
|
---|
104 | tstXPCOMCGlue_LIBS = \
|
---|
105 | $(VBoxXPCOMCGlue_1_TARGET)
|
---|
106 |
|
---|
107 | #
|
---|
108 | # The testcase (also in samples).
|
---|
109 | #
|
---|
110 | PROGRAMS.linux += tstXPCOMCDynLink
|
---|
111 | tstXPCOMCDynLink_TEMPLATE = VBOXR3
|
---|
112 | tstXPCOMCDynLink_INCS = \
|
---|
113 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
114 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub
|
---|
115 | tstXPCOMCDynLink_INTERMEDIATES = \
|
---|
116 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_CXPCOM.h
|
---|
117 | tstXPCOMCDynLink_SOURCES = \
|
---|
118 | tstdlOpen.c
|
---|
119 | endif
|
---|
120 |
|
---|
121 | endif # ! VBOX_ONLY_SDK
|
---|
122 |
|
---|
123 | # generate rules.
|
---|
124 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
125 |
|
---|