Permalink
Browse files

rebar3 support for bcrypt

  • Loading branch information...
joedevivo committed Jul 24, 2015
1 parent 7515e80 commit 085eb597216ef05f9b466c457858b42d2853244c
Showing with 20 additions and 3 deletions.
  1. +12 −3 rebar.config
  2. +7 −0 rebar.config.script
  3. +1 −0 rebar.lock
View
@@ -4,14 +4,23 @@
%% {so_specs,
%% [{"priv/bcrypt_nif.so",
%% ["c_src/*.c"]}]}.
{port_env,
[{"DRV_LDFLAGS","-shared $ERL_LDFLAGS -lpthread"},
{port_env, [
{"DRV_LDFLAGS","-shared $ERL_LDFLAGS -lpthread"},
{"darwin", "DRV_LDFLAGS", "-bundle -flat_namespace -undefined suppress $ERL_LDFLAGS -lpthread"},
{"solaris", "ERL_CFLAGS", "-lnsl $ERL_CFLAGS"},
{"DRV_CFLAGS","-Ic_src -Wall -fPIC $ERL_CFLAGS"}]}.
{"DRV_CFLAGS","-Ic_src -Wall -fPIC $ERL_CFLAGS"}
]}.
{port_specs, [{"priv/bcrypt_nif.so", ["c_src/*.c"]}]}.
{post_hooks,
[{clean, "make -C c_src clean"},
{compile, "make -C c_src"}]}.
{plugins, [pc]}.
{provider_hooks, [
{pre, [
{compile, {pc, compile}},
{clean, {pc, clean}}
]}
]}.
View
@@ -0,0 +1,7 @@
case code:is_loaded(rebar3) of
false ->
C1 = proplists:delete(plugins, CONFIG),
proplists:delete(provider_hooks, C1);
{file, _} ->
proplists:delete(post_hooks, CONFIG)
end.
View
@@ -0,0 +1 @@
[].

0 comments on commit 085eb59

Please sign in to comment.