+#
+# flag --- Comp switch --- Description
+# ----------------------------------------------------------------------------
+#
+# debug = no/yes --- -DNDEBUG --- Enable/Disable debug mode
+# optimize = yes/no --- (-O3/-fast etc.) --- Enable/Disable optimizations
+# arch = (name) --- (-arch) --- Target architecture
+# os = (name) --- --- Target operating system
+# bits = 64/32 --- -DIS_64BIT --- 64-/32-bit operating system
+# bigendian = no/yes --- -DBIGENDIAN --- big/little-endian byte order
+# prefetch = no/yes --- -DUSE_PREFETCH --- Use prefetch x86 asm-instruction
+# bsfq = no/yes --- -DUSE_BSFQ --- Use bsfq x86_64 asm-instruction
+# --- (Works only with GCC and ICC 64-bit)
+# popcnt = no/yes --- -DUSE_POPCNT --- Use popcnt x86_64 asm-instruction
+#
+# Note that Makefile is space sensitive, so when adding new architectures
+# or modifying existing flags, you have to make sure there are no extra spaces
+# at the end of the line for flag values.
+
+### 2.1. General
+debug = no
+optimize = yes
+
+### 2.2 Architecture specific
+
+# General-section
+ifeq ($(ARCH),general-64)
+ arch = any
+ os = any
+ bits = 64
+ bigendian = no
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+ifeq ($(ARCH),general-32)
+ arch = any
+ os = any
+ bits = 32
+ bigendian = no
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+ifeq ($(ARCH),bigendian-64)
+ arch = any
+ os = any
+ bits = 64
+ bigendian = yes
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+ifeq ($(ARCH),bigendian-32)
+ arch = any
+ os = any
+ bits = 32
+ bigendian = yes
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+# x86-section
+ifeq ($(ARCH),x86-64)
+ arch = x86_64
+ os = any
+ bits = 64
+ bigendian = no
+ prefetch = yes
+ bsfq = yes
+ popcnt = no
+endif
+
+ifeq ($(ARCH),x86-64-modern)
+ arch = x86_64
+ os = any
+ bits = 64
+ bigendian = no
+ prefetch = yes
+ bsfq = yes
+ popcnt = yes
+endif
+
+ifeq ($(ARCH),x86-32)
+ arch = i386
+ os = any
+ bits = 32
+ bigendian = no
+ prefetch = yes
+ bsfq = no
+ popcnt = no
+endif
+
+ifeq ($(ARCH),x86-32-old)
+ arch = i386
+ os = any
+ bits = 32
+ bigendian = no
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+# osx-section
+ifeq ($(ARCH),osx-ppc-64)
+ arch = ppc64
+ os = osx
+ bits = 64
+ bigendian = yes
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+ifeq ($(ARCH),osx-ppc-32)
+ arch = ppc
+ os = osx
+ bits = 32
+ bigendian = yes
+ prefetch = no
+ bsfq = no
+ popcnt = no
+endif
+
+ifeq ($(ARCH),osx-x86-64)
+ arch = x86_64
+ os = osx
+ bits = 64
+ bigendian = no
+ prefetch = yes
+ bsfq = yes
+ popcnt = no
+endif
+
+ifeq ($(ARCH),osx-x86-32)
+ arch = i386
+ os = osx
+ bits = 32
+ bigendian = no
+ prefetch = yes
+ bsfq = no
+ popcnt = no
+endif