Skip to content

Commit 13246ed

Browse files
committed
Update rebar.config
1 parent 6731e67 commit 13246ed

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

rebar.config

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,34 @@
66
warn_export_all
77
%% warn_untyped_record
88
]}.
9-
{xref_checks, [undefined_function_calls]}.
10-
%% {cover_enabled, true}.
9+
10+
{erl_opts, [
11+
debug_info,
12+
warnings_as_errors,
13+
warn_export_all
14+
]}.
15+
16+
{xref_checks, [
17+
undefined_function_calls
18+
]}.
1119
{validate_app_modules, true}.
1220

13-
{port_sources, ["c_src/*.c"]}.
14-
{so_name, "jsonx.so"}.
15-
{port_envs,
16-
[ {"DRV_CFLAGS", "-Wall -fPIC -O2 $ERL_CFLAGS"}
17-
]}.
18-
%% {so_specs, [
19-
%% {"priv/jsonx.so",["c_src/jsonx.o", "c_src/decoder.o, "c_src/encoder.o"]}
20-
%% ]}.
21+
{port_specs, [
22+
{"priv/jsonx.so", ["c_src/jsonx.c", "c_src/decoder.c", "c_src/encoder.c"]}
23+
]}.
24+
25+
{port_env, [
26+
{".*", "CXXFLAGS", "$CXXFLAGS -g -Wall -Werror -O3"},
27+
28+
%% OS X Leopard flags for 64-bit
29+
{"darwin9.*-64$", "CXXFLAGS", "-m64"},
30+
{"darwin9.*-64$", "LDFLAGS", "-arch x86_64"},
31+
32+
%% OS X Snow Leopard flags for 32-bit
33+
{"darwin10.*-32$", "CXXFLAGS", "-m32"},
34+
{"darwin10.*-32$", "LDFLAGS", "-arch i386"},
35+
36+
%% This will merge into basho/rebar/rebar.config eventually
37+
{"win32", "CFLAGS", "/Wall /DWIN32 /D_WINDOWS /D_WIN32 /DWINDOWS"},
38+
{"win32", "CXXFLAGS", "-g -Wall -O3"}
39+
]}.

0 commit comments

Comments
 (0)