Merge pull request #1 from tolbrino/tb-rebar3-win32
Update to rebar3 and add win32 support
This commit is contained in:
commit
c818ddc200
28
rebar.config
28
rebar.config
@ -6,17 +6,27 @@
|
|||||||
|
|
||||||
{deps, [{hex2bin, "1.0.0"}]}.
|
{deps, [{hex2bin, "1.0.0"}]}.
|
||||||
|
|
||||||
{clean_files, [".eunit",
|
{plugins, [pc]}.
|
||||||
"ebin/*.beam"]}.
|
|
||||||
|
{provider_hooks, [
|
||||||
|
{pre, [
|
||||||
|
{compile, {pc, compile}},
|
||||||
|
{clean, {pc, clean}}
|
||||||
|
]}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
{port_specs, [
|
||||||
|
{"priv/sha3_nif.so", [
|
||||||
|
"c_src/*.c"
|
||||||
|
]}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
{port_env, [
|
||||||
|
{"(linux|darwin)", "CFLAGS", "$CFLAGS -O2 -finline-functions -fomit-frame-pointer -fno-strict-aliasing -Wmissing-prototypes -Wall -std=c99"},
|
||||||
|
{"win32", "CFLAGS", "$CFLAGS /LD /O2 /DNDEBUG"}
|
||||||
|
]}.
|
||||||
|
|
||||||
{pre_hooks,
|
|
||||||
[{"(linux|darwin|solaris)", compile, "make -C c_src"},
|
|
||||||
{"(freebsd)", compile, "gmake -C c_src"}]}.
|
|
||||||
{post_hooks,
|
|
||||||
[{"(linux|darwin|solaris)", clean, "make -C c_src clean"},
|
|
||||||
{"(freebsd)", clean, "gmake -C c_src clean"}]}.
|
|
||||||
|
|
||||||
{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}.
|
{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}.
|
||||||
|
|
||||||
{xref_checks, [fail_on_warning, undefined_function_calls]}.
|
{xref_checks, [fail_on_warning, undefined_function_calls]}.
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ init() ->
|
|||||||
Path ->
|
Path ->
|
||||||
Path
|
Path
|
||||||
end,
|
end,
|
||||||
erlang:load_nif(filename:join(PrivDir, "erlang-sha3"), 0).
|
erlang:load_nif(filename:join(PrivDir, sha3_nif), 0).
|
||||||
|
|
||||||
%% @doc Returns a new context for hash operation.
|
%% @doc Returns a new context for hash operation.
|
||||||
%% Bit length of digest (`BitLen') must be one of 224, 256, 384 and 512.
|
%% Bit length of digest (`BitLen') must be one of 224, 256, 384 and 512.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user