2
# Makefile for a sample/testcase using the 'glue' Java API bindings
5
# Copyright (C) 2010-2011 Oracle Corporation
7
# This file is part of VirtualBox Open Source Edition (OSE), as
8
# available from http://www.virtualbox.org. This file is free software;
9
# you can redistribute it and/or modify it under the terms of the GNU
10
# General Public License (GPL) as published by the Free Software
11
# Foundation, in version 2 as it comes in the "COPYING" file of the
12
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17
# User serviceable parts: adjust the following lines appropriately
20
# The host OS: linux, solaris, win, darwin, freebsd
22
# Absolute (!) path to the VirtualBox install directory
23
VBOX_BIN = /opt/VirtualBox
24
# Path to the sdk directory of the unpacked VirtualBox SDK
26
# On Windows, if you want to use the COM API: install directory of Jacob lib
28
# Extra classpath entries needed for compiling/running the sample
30
# Java compiler to use
37
# No changes should be necessary after this point.
41
JACOB_JAR=$(JACOB_DIR)/jacob.jar
42
VBOX_JAR=$(VBOX_SDK)/bindings/mscom/java/vboxjmscom.jar
44
JAVA_COM_ARGS += -Djava.library.path=$(JACOB_DIR)
45
CLASSPATH += $(JACOB_JAR)$(SEP)
47
VBOX_JAR=$(VBOX_SDK)/bindings/xpcom/java/vboxjxpcom.jar
49
JAVA_COM_ARGS += -Dvbox.home=$(VBOX_BIN)
52
VBOX_JAR_WS=$(VBOX_SDK)/bindings/webservice/java/jax-ws/vboxjws.jar
55
all: ws/TestVBox.class com/TestVBox.class
57
test: ws/test-TestVBox com/test-TestVBox
60
@mkdir com 2>/dev/null || true
61
$(JAVAC) -d com -cp $(VBOX_JAR)$(SEP)$(CLASSPATH) TestVBox.java
63
com/test-TestVBox: com/TestVBox.class
64
$(JAVA) $(JAVA_COM_ARGS) -cp com$(SEP)$(VBOX_JAR)$(SEP)$(CLASSPATH) TestVBox
67
@mkdir ws 2>/dev/null || true
68
$(JAVAC) -d ws -cp $(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox.java
70
ws/test-TestVBox: ws/TestVBox.class
71
$(JAVA) $(JAVA_WS_ARGS) -cp ws$(SEP)$(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox -w -url http://localhost:18083/