HOST_PLATFORM := win32
WINDOWS_HOST := defined
else
- ifeq "$(OSTYPE)" "FreeBSD"
- # tocheck: temporarily using linux when on bsd
+ _UNAME := $(shell uname)
+ UNAME_P := $(shell uname -p)
+ ifeq "$(_UNAME)" "FreeBSD"
+ # Using Linux platform for Unix OSes for now
# HOST_PLATFORM := bsd
BSD_HOST := defined
HOST_PLATFORM := linux
LINUX_HOST := defined
else
- ifeq "$(shell uname)" "Darwin"
+ ifeq "$(_UNAME)" "Darwin"
HOST_PLATFORM := apple
OSX_HOST := defined
else
LINUX_HOST := defined
endif
endif
- UNAME_P := $(shell uname -p)
HOST_ARCH := $(UNAME_P)
endif
endif
endif
+ifeq "$(GCC_PREFIX)" "i586-mingw32msvc-"
+export ARCH
+ARCH := x32
+endif
+
+ifeq "$(GCC_PREFIX)" "i686-w64-mingw32-"
+export ARCH
+ARCH := x32
+endif
+
# Accept different things for ARCH but standardize on x32/x64
# This will be used for object directories
ifdef ARCH
HOST_SO := $(if $(WINDOWS_HOST),.dll,$(if $(OSX_HOST),.dylib,.so))
HOST_LP := $(if $(WINDOWS_HOST),$(if $(STATIC_LIBRARY_TARGET),lib,),lib)
+# VERSIONING
+VER := $(if $(LINUX_TARGET),$(if $(LINUX_HOST),$(if $(VERSION),.$(VERSION),),),)
+
# SUPER TOOLS
ifdef CCACHE
CCACHE_COMPILE := ccache$(space)