From 36b2fbfd92f4b1ae7a457128ae09b38d5ba149ac Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 24 Jan 2010 11:23:58 +0000 Subject: Somewhat hacky support for cross-compiling for BeOS/Haiku. svn path=/trunk/tools/buildsystem/; revision=9880 --- makefiles/Makefile.tools | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'makefiles') 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 -- cgit v1.2.3