ref: 5efb0a9a33edba18c9b215cb4c2cee15174918c5
parent: 977768ac880deaa63c43998a84d0b0f68651f67e
author: Varun B Patil <varun.basavaraj.patil@gmail.com>
date: Tue Jan 28 07:35:36 EST 2014
Attempt to detect OS arch(32/64 bit) on most platforms Attempt to automatically detect 32bit or 64bit OS architecture in Makefile, unless user has specified preference on the command line.
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
UNAME=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
+ARCH=$(shell uname -m)
LIBPREFIX=lib
LIBSUFFIX=a
CXX_O=-o $@
@@ -11,7 +12,11 @@
CFLAGS_M64=-m64
BUILDTYPE=Release
-
+ifeq (, $(ENABLE64BIT))
+ifeq ($(ARCH), x86_64)
+ENABLE64BIT=Yes
+endif
+endif
ifeq (,$(wildcard ./gtest))
HAVE_GTEST=No