1N/A# $Revision$
1N/A## @file makefile.tstCAPIGlue
1N/A# Makefile for sample program illustrating use of C binding for COM/XPCOM.
1N/A#
1N/A
1N/A#
1N/A# Copyright (C) 2009-2014 Oracle Corporation
1N/A#
1N/A# This file is part of VirtualBox Open Source Edition (OSE), as
1N/A# available from http://www.virtualbox.org. This file is free software;
1N/A# you can redistribute it and/or modify it under the terms of the GNU
1N/A# General Public License (GPL) as published by the Free Software
1N/A# Foundation, in version 2 as it comes in the "COPYING" file of the
1N/A# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1N/A# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1N/A#
1N/A
1N/APATH_SDK = ../../..
1N/ACAPI_INC = -I$(PATH_SDK)/bindings/c/include
1N/Aifeq ($(BUILD_PLATFORM),win)
1N/APLATFORM_INC = -I$(PATH_SDK)/bindings/mscom/include
1N/APLATFORM_LIB = $(PATH_SDK)/bindings/mscom/lib
1N/Aelse
1N/APLATFORM_INC = -I$(PATH_SDK)/bindings/xpcom/include
1N/APLATFORM_LIB = $(PATH_SDK)/bindings/xpcom/lib
1N/Aendif
1N/AGLUE_DIR = $(PATH_SDK)/bindings/c/glue
1N/AGLUE_INC = -I$(GLUE_DIR)
1N/A
1N/ACC = gcc
1N/ACFLAGS = -g -Wall
1N/A
1N/A.PHONY: all
1N/Aall: tstCAPIGlue
1N/A
1N/A.PHONY: clean
1N/Aclean:
1N/A rm -f tstCAPIGlue.o VBoxCAPIGlue.o VirtualBox_i.o tstCAPIGlue
1N/A
1N/AtstCAPIGlue: tstCAPIGlue.o VBoxCAPIGlue.o VirtualBox_i.o
1N/A $(CC) -o $@ $^ -ldl -lpthread
1N/A
1N/AtstCAPIGlue.o: tstCAPIGlue.c
1N/A $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
1N/A
1N/AVBoxCAPIGlue.o: $(GLUE_DIR)/VBoxCAPIGlue.c
1N/A $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
1N/A
1N/AVirtualBox_i.o: $(PLATFORM_LIB)/VirtualBox_i.c
1N/A $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
1N/A