diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-24 11:23:58 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-24 11:23:58 +0000 |
commit | 36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac (patch) | |
tree | f7c555889d02ef65c15d7900b931e748563f532f | |
parent | ca7bee0100db219771644dc78fea965eba43ca34 (diff) | |
download | buildsystem-36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac.tar.gz buildsystem-36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac.tar.bz2 |
Somewhat hacky support for cross-compiling for BeOS/Haiku.
svn path=/trunk/tools/buildsystem/; revision=9880
-rw-r--r-- | makefiles/Makefile.tools | 21 |
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 |