summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.tools
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-01-24 11:23:58 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-01-24 11:23:58 +0000
commit36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac (patch)
treef7c555889d02ef65c15d7900b931e748563f532f /makefiles/Makefile.tools
parentca7bee0100db219771644dc78fea965eba43ca34 (diff)
downloadbuildsystem-36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac.tar.gz
buildsystem-36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac.tar.bz2
Somewhat hacky support for cross-compiling for BeOS/Haiku.
svn path=/trunk/tools/buildsystem/; revision=9880
Diffstat (limited to 'makefiles/Makefile.tools')
-rw-r--r--makefiles/Makefile.tools21
1 files changed, 18 insertions, 3 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 072d299..7b5190d 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -146,17 +146,32 @@ ifeq ($(TARGET),beos)
PKGCONFIG ?=
# Default prefix
- PREFIX ?= /boot/home/config
+ BEOS_INSTALL_ENV ?= /boot/home/config
else
ifeq ($(HOST),haiku)
# Building on Haiku
# Default prefix
- PREFIX ?= /boot/common
+ BEOS_INSTALL_ENV ?= /boot/common
else
- $(error Cross-compiling for BeOS is not supported)
+ # TODO: more sensible default
+ BEOS_INSTALL_ENV ?= /home/jmb/haiku/env
+ BEOS_INSTALL_CROSSBIN ?= /home/jmb/haiku/haiku/generated/cross-tools/bin
+
+ CC__ := $(wildcard BEOS_INSTALL_CROSSBIN/*gcc)
+ CXX__ := $(wildcard BEOS_INSTALL_CROSSBIN/*g++)
+ AR__ := $(wildcard BEOS_INSTALL_CROSSBIN/*ar)
+
+ # TODO: can we avoid the need for this by setting PKG_CONFIG_LIBDIR here?
+ PKGCONFIG := $(BEOS_INSTALL_ENV)/bin/beos-pkg-config
endif
endif
+
+ CFLAGS := $(CFLAGS) -I$(BEOS_INSTALL_ENV)/include
+ CXXFLAGS := $(CXXFLAGS) -I$(BEOS_INSTALL_ENV)/include
+ LDFLAGS := $(LDFLAGS) -L$(BEOS_INSTALL_ENV)/lib
+
+ PREFIX ?= $(BEOS_INSTALL_ENV)
endif
# Windows