-
Notifications
You must be signed in to change notification settings - Fork 177
/
rebar.config
51 lines (40 loc) · 1.4 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
43
44
45
46
47
48
49
50
51
%%-*- mode: erlang -*-
{minimum_otp_vsn, "22.0"}.
{eunit_opts, [verbose]}.
{plugins, [{eqc_rebar, {git, "https://github.com/Quviq/eqc-rebar", {branch, "master"}}}, pc]}.
{provider_hooks, [
{post, [
{compile, {pc, compile}},
{clean, {pc, clean}}
]}
]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
{erl_opts, [warnings_as_errors, debug_info]}.
{profiles, [
{gha, [{erl_opts, [{d, 'GITHUBEXCLUDE'}]}]}
]}.
{port_specs, [{"priv/eleveldb.so", ["c_src/*.cc"]}]}.
{artifacts, ["priv/eleveldb.so"]}.
{port_env, [
%% Make sure to set -fPIC when compiling leveldb
{"CXXFLAGS", "$CXXFLAGS -Wall -O3 -fPIC -I c_src/leveldb/include -I c_src/leveldb"},
{"LDFLAGS", "$LDFLAGS c_src/leveldb/libleveldb.a -lsnappy -lstdc++"}
]}.
{pre_hooks, [
{"(linux|darwin|solaris)", 'get-deps', "./make -C c_src get-deps"},
{"(freebsd|netbsd|openbsd)", 'get-deps', "gmake -C c_src get-deps"},
{"(linux|darwin|solaris)", compile, "make -C c_src compile"},
{"(freebsd|netbsd|openbsd)", compile, "gmake -C c_src compile"},
{"(linux|darwin|solaris)", eunit, "make -C c_src test"},
{"(freebsd|netbsd|openbsd)", eunit, "gmake -C c_src test"}
]}.
{post_hooks, [
{"(linux|darwin|solaris)", clean, "make -C c_src clean"},
{"(freebsd|netbsd|openbsd)", clean, "gmake -C c_src clean"}
]}.