### ==========================================================================
### Establish the operating system name
### ==========================================================================
### Establish the operating system name
# ----------------------------------------------------------------------------
#
# debug = yes/no --- -DNDEBUG --- Enable/Disable debug mode
# ----------------------------------------------------------------------------
#
# debug = yes/no --- -DNDEBUG --- Enable/Disable debug mode
# optimize = yes/no --- (-O3/-fast etc.) --- Enable/Disable optimizations
# arch = (name) --- (-arch) --- Target architecture
# bits = 64/32 --- -DIS_64BIT --- 64-/32-bit operating system
# optimize = yes/no --- (-O3/-fast etc.) --- Enable/Disable optimizations
# arch = (name) --- (-arch) --- Target architecture
# bits = 64/32 --- -DIS_64BIT --- 64-/32-bit operating system
- CXXFLAGS += -pedantic -Wextra -Wshadow -m$(bits)
- ifneq ($(UNAME),Darwin)
+ CXXFLAGS += -pedantic -Wextra -Wshadow
+
+ ifeq ($(ARCH),armv7)
+ ifeq ($(OS),Android)
+ CXXFLAGS += -m$(bits)
+ endif
+ else
+ CXXFLAGS += -m$(bits)
+ endif
+
+ ifneq ($(KERNEL),Darwin)
ifeq ($(bits),64)
ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
CXX=x86_64-w64-mingw32-c++
ifeq ($(bits),64)
ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
CXX=x86_64-w64-mingw32-c++
CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9
LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9
endif
CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9
LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9
endif
### On mingw use Windows threads, otherwise POSIX
ifneq ($(comp),mingw)
# On Android Bionic's C library comes with its own pthread implementation bundled in
### On mingw use Windows threads, otherwise POSIX
ifneq ($(comp),mingw)
# On Android Bionic's C library comes with its own pthread implementation bundled in
### 3.9 Android 5 can only run position independent executables. Note that this
### breaks Android 4.0 and earlier.
### 3.9 Android 5 can only run position independent executables. Note that this
### breaks Android 4.0 and earlier.