endif
+# On Windows/32 bit systems, pass -m32 as TDM-GCC packaged with the installer produces 64 bit executables by default
+# Disable this if your compiler does not accept -m32
+ifndef ARCH
+ ifeq "$(HOST_PLATFORM)" "win32"
+ ifeq "$(TARGET_PLATFORM)" "win32"
+ ifndef ProgramFiles(x86)
+ ARCH := x32
+ TARGET_ARCH := i386
+ ARCH_FLAGS := -m32
+ endif
+ endif
+ endif
+endif
+
# DEBUG SUFFIX
ifdef DEBUG
DEBUG_SUFFIX := .debug
else
ifneq ($(shell $(GIT) log -n 1 --format="%%%%" $(nullerror)),)
export GIT_REPOSITORY := yes
- export REPOSITORY_VER := $(shell $(GIT) describe --tags --dirty="\ (dirty)" --always)
+ export REPOSITORY_VER := $(shell $(GIT) describe --tags --dirty=" (dirty)" --always)
endif
endif
endif
FVISIBILITY := $(if $(WINDOWS_TARGET),,-fvisibility=hidden)
FPIC := $(if $(WINDOWS_TARGET),,-fPIC)
EXECUTABLE := $(if $(WINDOWS_TARGET),$(if $(EXECUTABLE_TARGET),$(CONSOLE),),)
-INSTALLNAME := $(if $(OSX_TARGET),$(if $(STATIC_LIBRARY_TARGET),-install_name $(LP)$(MODULE)$(SO),),)
+INSTALLNAME := $(if $(OSX_TARGET),$(if $(SHARED_LIBRARY_TARGET),-install_name $(LP)$(MODULE)$(SO),),)
# LINKER OPTIONS
SHAREDLIB := $(if $(SHARED_LIBRARY_TARGET),$(if $(OSX_TARGET),-dynamiclib -single_module -multiply_defined suppress,-shared),)