1 | # $Revision: 16514 $
|
---|
2 | ## @file makefile.tstLinuxC
|
---|
3 | # Makefile for sample program illustrating use of C binding for XPCOM.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
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 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | PATH_XPCOM = ../..
|
---|
23 | PATH_BIN = /opt/VirtualBox
|
---|
24 |
|
---|
25 | INCS_XPCOM = -I$(PATH_XPCOM)/include \
|
---|
26 | -I$(PATH_XPCOM)/include/nsprpub \
|
---|
27 | -I$(PATH_XPCOM)/include/string \
|
---|
28 | -I$(PATH_XPCOM)/include/xpcom \
|
---|
29 | -I$(PATH_XPCOM)/include/ipcd \
|
---|
30 | -I$(PATH_VBOX_SVN)/include
|
---|
31 |
|
---|
32 | CC = gcc
|
---|
33 | CFLAGS = -g -ansi -pedantic -Wall
|
---|
34 |
|
---|
35 | .PHONY: all
|
---|
36 | all: tstLinuxC run
|
---|
37 |
|
---|
38 | .PHONY: clean
|
---|
39 | clean:
|
---|
40 | rm -f tstLinuxC.o tstLinuxC run
|
---|
41 |
|
---|
42 | tstLinuxC: tstLinuxC.o
|
---|
43 | $(CC) -o $@ $^ -Xlinker -rpath -Xlinker $(PATH_BIN) $(PATH_BIN)/VBoxXPCOMC.so
|
---|
44 |
|
---|
45 | tstLinuxC.o: tstLinuxC.c cbinding.h
|
---|
46 | $(CC) $(CFLAGS) -DRT_OS_LINUX -DMOZ_UNICODE $(INCS_XPCOM) -o $@ -c $<
|
---|
47 |
|
---|
48 | run:
|
---|
49 | echo "env VBOX_XPCOM_HOME=$(PATH_BIN) ./tstLinuxC" > $@
|
---|
50 | chmod a+x $@
|
---|