Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT
Conflicts:
server/src/main/c++/nativeMap/Makefile
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/60609f34
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/60609f34
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/60609f34
Branch: refs/heads/master
Commit: 60609f341ced1cadb11b7fa1f1f881226d05a21d
Parents: 9f86320 0e88221
Author: Josh Elser <[email protected]>
Authored: Sun Oct 27 23:59:58 2013 -0400
Committer: Josh Elser <[email protected]>
Committed: Sun Oct 27 23:59:58 2013 -0400
----------------------------------------------------------------------
server/src/main/c++/nativeMap/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/60609f34/server/src/main/c++/nativeMap/Makefile
----------------------------------------------------------------------
diff --cc server/src/main/c++/nativeMap/Makefile
index 26a8ad9,0000000..f27afcd
mode 100644,000000..100644
--- a/server/src/main/c++/nativeMap/Makefile
+++ b/server/src/main/c++/nativeMap/Makefile
@@@ -1,75 -1,0 +1,80 @@@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SRCS=$(filter-out test.cc,$(wildcard *.cc))
+HDRS=$(wildcard *.h) org_apache_accumulo_server_tabletserver_NativeMap.h
+CXX=g++
+
+ifeq ($(shell uname),Linux)
+ 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)
++<<<<<<< HEAD:server/src/main/c++/nativeMap/Makefile
+ LIBS:= libNativeMap-Mac_OS_X-x86_64-64.jnilib
- CXXFLAGS=-m64 -dynamiclib -O3
-I/System/Library/Frameworks/JavaVM.framework/Headers
++ # Update flags for OSX-10.9 and Xcode 5.0.1
++ # I think that we should be able to remove the `-undefined dynamic_lookup`
option,
++ # but I don't know exactly how to go about this.
++ CXXFLAGS=-m64 -dynamiclib -undefined dynamic_lookup -O3
-I/System/Library/Frameworks/JavaVM.framework/Headers -I${JAVA_HOME}/include
-I${JAVA_HOME}/include/darwin \
++ -I/usr/include/c++/4.2.1
+endif
+
+INSTALL_DIR=../../../../../lib/native/map
+INSTALLED_LIBS=$(patsubst %,$(INSTALL_DIR)/%,$(LIBS))
+
+all : $(INSTALLED_LIBS)
+
+clean:
+ rm -f $(INSTALLED_LIBS) $(LIBS)
+
+org_apache_accumulo_server_tabletserver_NativeMap.h :
+ javah -classpath ../../../../../lib/accumulo-server.jar
org.apache.accumulo.server.tabletserver.NativeMap
+
+$(INSTALLED_LIBS) : $(INSTALL_DIR) $(LIBS)
+ cp $(LIBS) $(INSTALL_DIR)
+
+$(INSTALL_DIR):
+ mkdir -p $@
+
+libNativeMap-Linux-amd64-64.so : $(SRCS) $(HDRS)
+ $(CXX) $(CXXFLAGS) -m64 -o $@ $(SRCS)
+
+libNativeMap-Linux-i386-32.so : $(SRCS) $(HDRS)
+ $(CXX) $(CXXFLAGS) -m32 -o $@ $(SRCS)
+
+libNativeMap-Mac_OS_X-x86_64-64.jnilib : $(SRCS) $(HDRS)
+ $(CXX) $(CXXFLAGS) -m64 -o $@ $(SRCS)
+