accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject svn commit: r1397981 - /accumulo/trunk/server/src/main/c++/nativeMap/Makefile
Date Sun, 14 Oct 2012 00:46:22 GMT
Author: elserj
Date: Sun Oct 14 00:46:22 2012
New Revision: 1397981

URL: http://svn.apache.org/viewvc?rev=1397981&view=rev
Log:
ACCUMULO-160 Applied a slightly modified version of the provided patch.

Modified:
    accumulo/trunk/server/src/main/c++/nativeMap/Makefile

Modified: accumulo/trunk/server/src/main/c++/nativeMap/Makefile
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/c%2B%2B/nativeMap/Makefile?rev=1397981&r1=1397980&r2=1397981&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/c++/nativeMap/Makefile (original)
+++ accumulo/trunk/server/src/main/c++/nativeMap/Makefile Sun Oct 14 00:46:22 2012
@@ -18,13 +18,33 @@ HDRS=$(wildcard *.h) org_apache_accumulo
 CXX=g++
 
 ifeq ($(shell uname),Linux)
-LIBS:= libNativeMap-Linux-amd64-64.so libNativeMap-Linux-i386-32.so
-CXXFLAGS=-g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing -Wall  -I$(JAVA_HOME)/include/linux
-I$(JAVA_HOME)/include
+  LIBS_32 := libNativeMap-Linux-i386-32.so
+  LIBS_64 := libNativeMap-Linux-amd64-64.so
+  
+  ifneq ($(DARCH),)
+    ifeq ($(DARCH),64)
+      LIBS := $(LIBS_64)
+    endif
+    ifeq ($(DARCH),32)
+      LIBS := $(LIBS_32)
+    endif
+    ifeq ($(DARCH),both)
+      LIBS := $(LIBS_64)$(LIBS_32)
+    endif
+    ifeq ($(LIBS),)
+      LIBS := $(LIBS_64)$(LIBS_32)
+    endif
+  else
+    DARCH := $(shell getconf LONG_BIT)
+    LIBS := $(LIBS_$(DARCH))
+  endif
+  
+  CXXFLAGS=-g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -I$(JAVA_HOME)/include/linux
-I$(JAVA_HOME)/include
 endif
 
 ifeq ($(shell uname),Darwin)
-LIBS:= libNativeMap-Mac_OS_X-x86_64-64.jnilib
-CXXFLAGS=-m64 -dynamiclib -O3 -I/System/Library/Frameworks/JavaVM.framework/Headers
+  LIBS:= libNativeMap-Mac_OS_X-x86_64-64.jnilib
+  CXXFLAGS=-m64 -dynamiclib -O3 -I/System/Library/Frameworks/JavaVM.framework/Headers
 endif
 
 INSTALL_DIR=../../../../../lib/native/map



Mime
View raw message