VirtualBox

source: vbox/trunk/src/VBox/Main/cbinding/makefile.tstLinuxC@ 16524

Last change on this file since 16524 was 16514, checked in by vboxsync, 16 years ago

No need for LD_LIBRARY_PATH because we link with -rpath $(PATH_BIN).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
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
22PATH_XPCOM = ../..
23PATH_BIN = /opt/VirtualBox
24
25INCS_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
32CC = gcc
33CFLAGS = -g -ansi -pedantic -Wall
34
35.PHONY: all
36all: tstLinuxC run
37
38.PHONY: clean
39clean:
40 rm -f tstLinuxC.o tstLinuxC run
41
42tstLinuxC: tstLinuxC.o
43 $(CC) -o $@ $^ -Xlinker -rpath -Xlinker $(PATH_BIN) $(PATH_BIN)/VBoxXPCOMC.so
44
45tstLinuxC.o: tstLinuxC.c cbinding.h
46 $(CC) $(CFLAGS) -DRT_OS_LINUX -DMOZ_UNICODE $(INCS_XPCOM) -o $@ -c $<
47
48run:
49 echo "env VBOX_XPCOM_HOME=$(PATH_BIN) ./tstLinuxC" > $@
50 chmod a+x $@
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette