commit 2cdf2584f27ea3c6ee1cdac05a6a2503690d5cc5 Author: Dave Smith Date: Sun Dec 18 13:54:46 2011 -0700 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4807074 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.beam +c_src/system +c_src/wiredtiger-*/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4b9c868 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ + +all: + ./rebar compile eunit + +clean: + ./rebar clean \ No newline at end of file diff --git a/c_src/build_deps.sh b/c_src/build_deps.sh new file mode 100755 index 0000000..aa54fc8 --- /dev/null +++ b/c_src/build_deps.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +WT_VSN=20111212 + +if [ `basename $PWD` != "c_src" ]; then + pushd c_src +fi + +BASEDIR="$PWD" + +case "$1" in + clean) + rm -rf system wiredtiger-$WT_VSN + ;; + + *) + test -f system/lib/libwiredtiger.a && exit 0 + + tar -xjf wiredtiger-$WT_VSN.tar.bz2 + + (cd wiredtiger-$WT_VSN/build_posix && \ + ../configure --disable-shared --enable-static --with-pic \ + --prefix=$BASEDIR/system && \ + make && make install) + + ;; +esac + diff --git a/c_src/wiredtiger-20111212.tar.bz2 b/c_src/wiredtiger-20111212.tar.bz2 new file mode 100644 index 0000000..4743b36 Binary files /dev/null and b/c_src/wiredtiger-20111212.tar.bz2 differ diff --git a/rebar b/rebar new file mode 100755 index 0000000..1b4b2f6 Binary files /dev/null and b/rebar differ diff --git a/rebar.config b/rebar.config new file mode 100644 index 0000000..a741613 --- /dev/null +++ b/rebar.config @@ -0,0 +1,10 @@ + +{port_envs, [ + {"DRV_CFLAGS", "$DRV_CFLAGS -Werror -I c_src/system/include"}, + {"DRV_LDFLAGS", "$DRV_LDFLAGS c_src/system/lib/libwiredtiger.a"} + ]}. + +{pre_hooks, [{compile, "c_src/build_deps.sh"}]}. + +{post_hooks, [{clean, "c_src/build_deps.sh clean"}]}. +