Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: Handle -m64 and -msse2 flags better
--- bowtie2.orig/Makefile
+++ bowtie2/Makefile
@@ -199,38 +199,12 @@
   SANITIZER_FLAGS := -fsanitize=undefined
 endif
 
-BITS := 32
-SSE_FLAG := -msse2
-ifeq (x86_64,$(shell uname -m))
-  BITS := 64
-else ifeq (amd64,$(shell uname -m))
-  BITS := 64
-else ifeq (aarch64,$(shell uname -m))
-  BITS := 64
-  SSE_FLAG :=
-  CXXFLAGS += -fopenmp-simd
-  CPPFLAGS += -Ithird_party/simde
-else ifeq (s390x,$(shell uname -m))
-  BITS := 64
-  SSE_FLAG :=
-  CXXFLAGS += -fopenmp-simd
-  CPPFLAGS += -Ithird_party/simde
-  SANITIZER_FLAGS :=
-else ifeq (ppc64le,$(shell uname -m))
-  BITS := 64
-  SSE_FLAG :=
-  CXXFLAGS += -fopenmp-simd
-  CPPFLAGS += -Ithird_party/simde
-  SANITIZER_FLAGS :=
-endif
-# msys will always be 32 bit so look at the cpu arch instead.
-ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
-  ifeq (1,$(MINGW))
-    BITS := 64
-  endif
-endif
-ifeq (32,$(BITS))
-  $(error bowtie2 compilation requires a 64-bit platform )
+ifeq (amd64,$(dpkg-architecture -q DEB_TARGET_ARCH))
+	SSE_FLAG = -msse2
+	M64_FLAG = -m64
+else
+	SSE_FLAG =
+	M64_FLAG =
 endif
 
 DEBUG_FLAGS    := -O0 -g3 $(SSE_FLAG)
