681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# $Revision$
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync## @file makefile.tstCAPIGlue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# Makefile for sample program illustrating use of C binding for COM/XPCOM.
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync#
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync#
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# Copyright (C) 2009-2014 Oracle Corporation
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync#
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# available from http://www.virtualbox.org. This file is free software;
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# you can redistribute it and/or modify it under the terms of the GNU
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# General Public License (GPL) as published by the Free Software
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync#
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncPATH_SDK = ../../..
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCAPI_INC = -I$(PATH_SDK)/bindings/c/include
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncifeq ($(BUILD_PLATFORM),win)
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncPLATFORM_INC = -I$(PATH_SDK)/bindings/mscom/include
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncPLATFORM_LIB = $(PATH_SDK)/bindings/mscom/lib
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncelse
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncPLATFORM_INC = -I$(PATH_SDK)/bindings/xpcom/include
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncPLATFORM_LIB = $(PATH_SDK)/bindings/xpcom/lib
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncendif
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncGLUE_DIR = $(PATH_SDK)/bindings/c/glue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncGLUE_INC = -I$(GLUE_DIR)
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCC = gcc
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncCFLAGS = -g -Wall
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync.PHONY: all
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncall: tstCAPIGlue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync.PHONY: clean
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncclean:
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync rm -f tstCAPIGlue.o VBoxCAPIGlue.o VirtualBox_i.o tstCAPIGlue
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsynctstCAPIGlue: tstCAPIGlue.o VBoxCAPIGlue.o VirtualBox_i.o
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CC) -o $@ $^ -ldl -lpthread
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsynctstCAPIGlue.o: tstCAPIGlue.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncVBoxCAPIGlue.o: $(GLUE_DIR)/VBoxCAPIGlue.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsyncVirtualBox_i.o: $(PLATFORM_LIB)/VirtualBox_i.c
681bb0bf6e9ab5a590d8afcdf37634e2fc29f595vboxsync $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<