1 | # $Id: Makefile 42209 2009-01-29 12:22:10Z jens $
|
---|
2 | #
|
---|
3 | ## @file makefile.tstLinuxC
|
---|
4 | #
|
---|
5 | # Makefile for sample program illustrating use of C binding for XPCOM.
|
---|
6 |
|
---|
7 | #
|
---|
8 | # Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
9 | #
|
---|
10 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | # available from http://www.virtualbox.org. This file is free software;
|
---|
12 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | # General Public License (GPL) as published by the Free Software
|
---|
14 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | #
|
---|
18 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
19 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
20 | # additional information or have any questions.
|
---|
21 | #
|
---|
22 |
|
---|
23 | PATH_XPCOM = ../..
|
---|
24 | PATH_BIN = /opt/VirtualBox
|
---|
25 |
|
---|
26 | INCS_XPCOM = -I$(PATH_XPCOM)/include \
|
---|
27 | -I$(PATH_XPCOM)/include/nsprpub \
|
---|
28 | -I$(PATH_XPCOM)/include/string \
|
---|
29 | -I$(PATH_XPCOM)/include/xpcom \
|
---|
30 | -I$(PATH_XPCOM)/include/ipcd \
|
---|
31 | -I$(PATH_VBOX_SVN)/include
|
---|
32 |
|
---|
33 | CC = gcc
|
---|
34 | CFLAGS = -g -ansi -pedantic -Wall
|
---|
35 |
|
---|
36 | .PHONY: all
|
---|
37 | all: tstLinuxC run
|
---|
38 |
|
---|
39 | .PHONY: clean
|
---|
40 | clean:
|
---|
41 | rm -f tstLinuxC.o tstLinuxC run
|
---|
42 |
|
---|
43 | tstLinuxC: tstLinuxC.o
|
---|
44 | $(CC) -o $@ $^ -Xlinker -rpath -Xlinker $(PATH_BIN) $(PATH_BIN)/VBoxXPCOMC.so
|
---|
45 |
|
---|
46 | tstLinuxC.o: tstLinuxC.c cbinding.h
|
---|
47 | $(CC) $(CFLAGS) -DRT_OS_LINUX -DMOZ_UNICODE $(INCS_XPCOM) -o $@ -c $<
|
---|
48 |
|
---|
49 | run:
|
---|
50 | echo "env VBOX_XPCOM_HOME=$(PATH_BIN) LD_LIBRARY_PATH=$(PATH_BIN) ./tstLinuxC" > $@
|
---|
51 | chmod a+x $@
|
---|