diff options
author | Timo Teras <timo.teras@iki.fi> | 2010-03-09 13:17:14 +0200 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2010-03-09 13:17:14 +0200 |
commit | 43e69b26126b8708b70680c6b4806eb3844386ab (patch) | |
tree | a82607c2089f34e9df5c87de94820715f9d38f7f | |
parent | 49f49db8c26b2ac4bf59212582c823b16163f153 (diff) | |
download | libtf-43e69b26126b8708b70680c6b4806eb3844386ab.tar.bz2 libtf-43e69b26126b8708b70680c6b4806eb3844386ab.tar.xz |
build: add os/arch detection
-rw-r--r-- | build/TFbuild.main | 17 |
1 files changed, 17 insertions, 0 deletions
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 |