build: TOPDIR is the same on all supported build platforms

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2012-10-30 15:01:44 +10:30
parent f9fd2cb594
commit ca53ed9827

View File

@ -32,25 +32,22 @@ TARGET_OS ?= $(HOST_OS)
# ============================================================================
SYSNAME := $(shell uname -s)
TOPDIR := $(shell pwd)
ifneq (,$(findstring MINGW32,$(SYSNAME)))
HOST_OS = WIN32
TOPDIR := $(shell pwd)
else
ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD OpenBSD))
HOST_OS = UNIX
UNIX = bsd
TOPDIR := $(shell pwd)
else
ifneq (,$(findstring $(SYSNAME),Darwin))
HOST_OS = UNIX
UNIX = darwin
TOPDIR := $(shell pwd)
else
ifneq (,$(findstring $(SYSNAME),Linux))
HOST_OS = UNIX
UNIX = linux
TOPDIR := $(shell pwd)
else
$(error OS type not detected.)
endif