Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: Handle -m64 and -msse2 flags better
--- bowtie2.orig/Makefile
+++ bowtie2/Makefile
@@ -197,31 +197,13 @@
 SEARCH_FRAGMENTS := $(wildcard search_*_phase*.c)
 VERSION := $(shell cat VERSION)
 
-BITS := 32
-ifeq (x86_64,$(shell uname -m))
-	BITS := 64
-endif
-ifeq (amd64,$(shell uname -m))
-	BITS := 64
-endif
-ifeq (aarch64,$(shell uname -m))
-	BITS := 64
-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 )
-endif
+M64_FLAG :=
 
-SSE_FLAG := -msse2
-M64_FLAG := -m64
-ifeq (aarch64,$(shell uname -m))
+ifeq (amd64,$(dpkg-architecture -q DEB_TARGET_ARCH))
+	SSE_FLAG := -msse2
+	M64_FLAG := -m64
+else
 	SSE_FLAG =
-	M64_FLAG =
 endif
 
 DEBUG_FLAGS    := -O0 -g3 $(M64_FLAG) $(SSE_FLAG)
