ifdef WINDOWS_HOST
# Auto-Select MinGW-w64 when asking for 64 bit
- ifeq "$(ARCH)" "x64"
+ ifeq ($(ARCH),x64)
GCC_PREFIX=x86_64-w64-mingw32-
endif
endif
+# EXTENSIONS
+OUT := $(if $(STATIC_LIBRARY_TARGET),$(A),$(if $(SHARED_LIBRARY_TARGET),$(SO)$(VER),$(if $(EXECUTABLE_TARGET),$(E),.x)))
+
# TOOLCHAIN
export CC = $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)gcc$(_SYSROOT)$(if $(GCC_CC_FLAGS),$(space)$(GCC_CC_FLAGS),)
export CPP = $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)gcc$(_SYSROOT)
ifdef WINDOWS_TARGET
WINDRES := $(GCC_PREFIX)windres
ifdef ARCH
- ifeq "$(ARCH)" "x32"
+ ifeq ($(ARCH),x32)
WINDRES_FLAGS := -F pe-i386
else
- ifeq "$(ARCH)" "x64"
+ ifeq ($(ARCH),x64)
WINDRES_FLAGS := -F pe-x86-64
endif
endif
else
TARGET_ARCH := i386
endif
+ else
+ ifdef LINUX_TARGET
+ ifneq ($(filter x86_64-pc-linux-gnu,$(TARGET_ARCH)),) # Fix for PREFIXLIBDIR / DEB_HOST_MULTIARCH with Clang on Debian
+ TARGET_ARCH := x86_64-linux-gnu
+ endif
+ ifneq ($(filter i586-linux-gnu,$(TARGET_ARCH)),)
+ TARGET_ARCH := i386-linux-gnu
+ endif
+ endif
endif
endif