accumulo-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1397987&view=rev
Log:
ACCUMULO-160 Applying changes to the nativeMap's Makefile to the MLock's Makefile too

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

Modified: accumulo/trunk/server/src/main/c++/mlock/Makefile
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/c%2B%2B/mlock/Makefile?rev=1397987&r1=1397986&r2=1397987&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/c++/mlock/Makefile (original)
+++ accumulo/trunk/server/src/main/c++/mlock/Makefile Sun Oct 14 00:59:11 2012
@@ -19,13 +19,33 @@ HDRS=$(wildcard *.h) org_apache_accumulo
 CXX=g++
 
 ifeq ($(shell uname),Linux)
-LIBS:= lib$(LIB)-Linux-amd64-64.so lib$(LIB)-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 := lib$(LIB)-Linux-i386-32.so
+  LIBS_64 := lib$(LIB)-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:= lib$(LIB)-Mac_OS_X-x86_64-64.jnilib
-CXXFLAGS=-m64 -dynamiclib -O3 -I/System/Library/Frameworks/JavaVM.framework/Headers
+  LIBS:= lib$(LIB)-Mac_OS_X-x86_64-64.jnilib
+  CXXFLAGS=-m64 -dynamiclib -O3 -I/System/Library/Frameworks/JavaVM.framework/Headers
 endif
 
 INSTALL_DIR=../../../../../lib/native/mlock



Mime
View raw message