ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync## @file
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Makefile for a sample/testcase using the 'glue' Java API bindings
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync#
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# Copyright (C) 2010-2012 Oracle Corporation
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync#
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# available from http://www.virtualbox.org. This file is free software;
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# you can redistribute it and/or modify it under the terms of the GNU
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# General Public License (GPL) as published by the Free Software
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync#
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync#
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# User serviceable parts: adjust the following lines appropriately
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync#
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# The host OS: linux, solaris, win, darwin, freebsd
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncHOSTOS=linux
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Absolute (!) path to the VirtualBox install directory
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsyncVBOX_BIN = /opt/VirtualBox
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Path to the sdk directory of the unpacked VirtualBox SDK
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncVBOX_SDK = ../../..
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# On Windows, if you want to use the COM API: install directory of Jacob lib
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncJACOB_DIR =
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Extra classpath entries needed for compiling/running the sample
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsyncCLASSPATH =
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Java compiler to use
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsyncJAVAC = javac
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Java VM to use
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsyncJAVA = java
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync#
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# No changes should be necessary after this point.
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync#
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncifeq ($(HOSTOS),win)
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync JACOB_JAR=$(JACOB_DIR)/jacob.jar
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync VBOX_JAR=$(VBOX_SDK)/bindings/mscom/java/vboxjmscom.jar
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync SEP=\;
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync JAVA_COM_ARGS += -Djava.library.path=$(JACOB_DIR)
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync CLASSPATH += $(JACOB_JAR)$(SEP)
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncelse
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync VBOX_JAR=$(VBOX_SDK)/bindings/xpcom/java/vboxjxpcom.jar
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync SEP=:
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync JAVA_COM_ARGS += -Dvbox.home=$(VBOX_BIN)
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncendif
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncVBOX_JAR_WS=$(VBOX_SDK)/bindings/webservice/java/jax-ws/vboxjws.jar
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncall: ws/TestVBox.class com/TestVBox.class
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsynctest: ws/test-TestVBox com/test-TestVBox
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsynccom/TestVBox.class:
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync @mkdir com 2>/dev/null || true
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync $(JAVAC) -d com -cp $(VBOX_JAR)$(SEP)$(CLASSPATH) TestVBox.java
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsynccom/test-TestVBox: com/TestVBox.class
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync $(JAVA) $(JAVA_COM_ARGS) -cp com$(SEP)$(VBOX_JAR)$(SEP)$(CLASSPATH) TestVBox
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncws/TestVBox.class:
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync @mkdir ws 2>/dev/null || true
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync $(JAVAC) -d ws -cp $(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox.java
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncws/test-TestVBox: ws/TestVBox.class
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync $(JAVA) $(JAVA_WS_ARGS) -cp ws$(SEP)$(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox -w -url http://localhost:18083/