From e86b620f9e6d406352140bbb1b931d8bfbafcaf5 Mon Sep 17 00:00:00 2001 From: Matei Zaharia Date: Sat, 13 Nov 2010 22:46:00 -0800 Subject: Fixed some more stuff (Eclispe target and native build) --- .gitignore | 8 ++++---- project/build/SparkProject.scala | 6 ++++++ project/plugins/SparkProjectPlugins.scala | 5 +++++ project/plugins/project/build.properties | 3 +++ run | 2 +- src/main/native/.gitignore | 3 +++ src/main/native/Makefile | 10 +++++----- 7 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 project/build/SparkProject.scala create mode 100644 project/plugins/SparkProjectPlugins.scala create mode 100644 project/plugins/project/build.properties create mode 100644 src/main/native/.gitignore diff --git a/.gitignore b/.gitignore index 7dbab181fa..486011dff5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,15 @@ *~ *.swp -build -work +/build/ +work/ .DS_Store third_party/libmesos.so third_party/libmesos.dylib conf/java-opts conf/spark-env.sh conf/log4j.properties -target -reports +target/ +reports/ .project .classpath .scala_dependencies diff --git a/project/build/SparkProject.scala b/project/build/SparkProject.scala new file mode 100644 index 0000000000..35838cb35b --- /dev/null +++ b/project/build/SparkProject.scala @@ -0,0 +1,6 @@ +import sbt._ +import de.element34.sbteclipsify._ + +class SparkProject(info: ProjectInfo) +extends DefaultProject(info) with Eclipsify { +} diff --git a/project/plugins/SparkProjectPlugins.scala b/project/plugins/SparkProjectPlugins.scala new file mode 100644 index 0000000000..e8c2dd7d94 --- /dev/null +++ b/project/plugins/SparkProjectPlugins.scala @@ -0,0 +1,5 @@ +import sbt._ + +class SparkProjectPlugins(info: ProjectInfo) extends PluginDefinition(info) { + lazy val eclipse = "de.element34" % "sbt-eclipsify" % "0.7.0" +} diff --git a/project/plugins/project/build.properties b/project/plugins/project/build.properties new file mode 100644 index 0000000000..392e09ef03 --- /dev/null +++ b/project/plugins/project/build.properties @@ -0,0 +1,3 @@ +#Project properties +#Sat Nov 13 22:26:46 PST 2010 +plugin.uptodate=true diff --git a/run b/run index f68042e129..683f2a2b3e 100755 --- a/run +++ b/run @@ -25,7 +25,7 @@ fi # Set JAVA_OPTS to be able to load native libraries and to set heap size JAVA_OPTS="$SPARK_JAVA_OPTS" -JAVA_OPTS+=" -Djava.library.path=$SPARK_LIBRARY_PATH:$FWDIR/lib:$FWDIR/src/native:$MESOS_LIBRARY_PATH" +JAVA_OPTS+=" -Djava.library.path=$SPARK_LIBRARY_PATH:$FWDIR/lib:$FWDIR/src/main/native:$MESOS_LIBRARY_PATH" JAVA_OPTS+=" -Xms$SPARK_MEM -Xmx$SPARK_MEM" # Load extra JAVA_OPTS from conf/java-opts, if it exists if [ -e $FWDIR/conf/java-opts ] ; then diff --git a/src/main/native/.gitignore b/src/main/native/.gitignore new file mode 100644 index 0000000000..b21d5dd963 --- /dev/null +++ b/src/main/native/.gitignore @@ -0,0 +1,3 @@ +/libspark_native.dylib +/libspark_native.so +/spark_compress_lzf_LZF.h diff --git a/src/main/native/Makefile b/src/main/native/Makefile index 6236e26f3d..5ab1c0868b 100644 --- a/src/main/native/Makefile +++ b/src/main/native/Makefile @@ -2,21 +2,21 @@ CC = gcc #JAVA_HOME = /usr/lib/jvm/java-6-sun OS_NAME = linux -CFLAGS = -fPIC -O3 -funroll-all-loops +CFLAGS += -fPIC -O3 -funroll-all-loops -SPARK = ../.. +SPARK = ../../.. -LZF = $(SPARK)/third_party/liblzf-3.5 +LZF = $(SPARK)/lib/liblzf-3.5 LIB = libspark_native.so all: $(LIB) -spark_compress_lzf_LZF.h: $(SPARK)/build/classes/spark/compress/lzf/LZF.class +spark_compress_lzf_LZF.h: $(SPARK)/target/scala_2.8.1/classes/spark/compress/lzf/LZF.class ifeq ($(JAVA_HOME),) $(error JAVA_HOME is not set) else - $(JAVA_HOME)/bin/javah -classpath $(SPARK)/build/classes spark.compress.lzf.LZF + $(JAVA_HOME)/bin/javah -classpath $(SPARK)/target/scala_2.8.1/classes spark.compress.lzf.LZF endif $(LIB): spark_compress_lzf_LZF.h spark_compress_lzf_LZF.c -- cgit v1.2.3