1 | # $Revision: 50183 $
|
---|
2 | ## @file makefile.tstCAPIGlue
|
---|
3 | # Makefile for sample program illustrating use of C binding for COM/XPCOM.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-2014 Oracle Corporation
|
---|
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 |
|
---|
18 | PATH_SDK = ../../..
|
---|
19 | CAPI_INC = -I$(PATH_SDK)/bindings/c/include
|
---|
20 | ifeq ($(BUILD_PLATFORM),win)
|
---|
21 | PLATFORM_INC = -I$(PATH_SDK)/bindings/mscom/include
|
---|
22 | PLATFORM_LIB = $(PATH_SDK)/bindings/mscom/lib
|
---|
23 | else
|
---|
24 | PLATFORM_INC = -I$(PATH_SDK)/bindings/xpcom/include
|
---|
25 | PLATFORM_LIB = $(PATH_SDK)/bindings/xpcom/lib
|
---|
26 | endif
|
---|
27 | GLUE_DIR = $(PATH_SDK)/bindings/c/glue
|
---|
28 | GLUE_INC = -I$(GLUE_DIR)
|
---|
29 |
|
---|
30 | CC = gcc
|
---|
31 | CFLAGS = -g -Wall
|
---|
32 |
|
---|
33 | .PHONY: all
|
---|
34 | all: tstCAPIGlue
|
---|
35 |
|
---|
36 | .PHONY: clean
|
---|
37 | clean:
|
---|
38 | rm -f tstCAPIGlue.o VBoxCAPIGlue.o VirtualBox_i.o tstCAPIGlue
|
---|
39 |
|
---|
40 | tstCAPIGlue: tstCAPIGlue.o VBoxCAPIGlue.o VirtualBox_i.o
|
---|
41 | $(CC) -o $@ $^ -ldl -lpthread
|
---|
42 |
|
---|
43 | tstCAPIGlue.o: tstCAPIGlue.c
|
---|
44 | $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
|
---|
45 |
|
---|
46 | VBoxCAPIGlue.o: $(GLUE_DIR)/VBoxCAPIGlue.c
|
---|
47 | $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
|
---|
48 |
|
---|
49 | VirtualBox_i.o: $(PLATFORM_LIB)/VirtualBox_i.c
|
---|
50 | $(CC) $(CFLAGS) $(CAPI_INC) $(PLATFORM_INC) $(GLUE_INC) -o $@ -c $<
|
---|