From 43e69b26126b8708b70680c6b4806eb3844386ab Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Tue, 9 Mar 2010 13:17:14 +0200 Subject: build: add os/arch detection --- build/TFbuild.main | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build/TFbuild.main b/build/TFbuild.main index b33aa49..36c580b 100644 --- a/build/TFbuild.main +++ b/build/TFbuild.main @@ -24,6 +24,23 @@ MANDIR ?= /usr/share/man DOCDIR ?= /usr/share/doc/$(PACKAGE) STATEDIR ?= /var/run +# OS and architecture detection +UNAME_OS := $(shell uname -s) +UNAME_ARCH := $(shell uname -m) + +ifeq ($(UNAME_OS),Linux) +OS_LINUX := y +OS_UNIX := y +else +$(error Sorry your operating system kernel ($(UNAME_OS)) is not supported yet.) +endif + +ifeq ($(patsubst i%86,i86,$(UNAME_ARCH)),i86) +ARCH_X86 := y +else +$(error Sorry your architecture ($(UNAME_ARCH)) is not supported yet.) +endif + # utilities and default flags for them. CROSS_COMPILE ?= CC := $(CROSS_COMPILE)gcc -- cgit v1.2.3