Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: Handle -m64 and -msse2 flags better
--- a/Makefile
+++ b/Makefile
@@ -61,9 +61,9 @@ ifneq (,$(findstring Darwin,$(shell unam
   endif
 endif
 
-BITS := 32
-ifneq (,$(findstring $(shell uname -m), x86_64 amd64))
-  BITS := 64
+CXXFLAGS += -fopenmp-simd
+CPPFLAGS += -Ithird_party
+ifeq (amd64,$(dpkg-architecture -q DEB_TARGET_ARCH))
   ifeq (1, $(SSE_AVX2))
 	SSE_FLAG := -mavx2 -faligned-new -DSSE_AVX2
   else
@@ -71,11 +71,8 @@ ifneq (,$(findstring $(shell uname -m),
   endif
 
   POPCNT_CAPABILITY ?= 1
-else ifneq (,$(findstring $(shell uname -m), aarch64 arm64 s390x ppc64 ppc64le))
-  BITS := 64
-  SSE_FLAG :=
-  CXXFLAGS += -fopenmp-simd
-  CPPFLAGS += -Ithird_party
+else
+  SSE_FLAG =
   POPCNT_CAPABILITY ?= 0
 endif
 
