forked from basho/eleveldb
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrebar.config
42 lines (34 loc) · 1.14 KB
/
rebar.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%%-*- mode: erlang -*-
{plugins, [pc]}.
{artifacts, ["priv/eleveldb.so"]}.
{xref_checks, [undefined_function_calls]}.
{port_specs, [{ "priv/eleveldb.so", ["c_src/*.cc"] }]}.
{erl_opts, [warnings_as_errors, debug_info]}.
{profiles,
[
{test,[
{deps,[
{cuttlefish, {git, "https://github.com/Kyorai/cuttlefish.git", {tag, "v2.3.0"}}}
]},
{eunit_opts, [verbose]}
]}
]}.
{port_env, [
%% Make sure to set -fPIC when compiling leveldb
{"CFLAGS", "$CFLAGS -Wall -O3 -fPIC"},
{"CXXFLAGS", "$CXXFLAGS -Wall -O3 -fPIC"},
{"DRV_CFLAGS", "$DRV_CFLAGS -O3 -Wall -I c_src/leveldb/include -I c_src/leveldb -I c_src/system/include"},
{"(freebsd)", "DRV_LDFLAGS", "$DRV_LDFLAGS c_src/leveldb/libleveldb.a -lstdc++"},
{"^(?s)((?!freebsd).)*$", "DRV_LDFLAGS", "$DRV_LDFLAGS c_src/leveldb/libleveldb.a -lsnappy -lstdc++"}
]}.
{pre_hooks, [
{"(linux|darwin|solaris|freebsd)", compile, "c_src/build_deps.sh get-deps"},
{"(linux|darwin|solaris|freebsd)", compile, "c_src/build_deps.sh"}
]}.
{provider_hooks, [
{post,[
{compile, {pc, compile}},
{clean, {pc, clean}}
]
}
]}.