Merge pull request #1 from tolbrino/tb-rebar3-win32

Update to rebar3 and add win32 support
This commit is contained in:
Tino Breddin 2018-12-11 14:43:04 +01:00 committed by GitHub
commit c818ddc200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 10 deletions

View File

@ -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]}.

BIN
rebar3 Executable file

Binary file not shown.

View File

@ -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.