blob: d3d76a7b496c1f63920289f237a83f63a17c33f4 [file] [log] [blame]
%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*-
%% {erl_opts, [debug_info]}.
%% {so_specs,
%% [{"priv/bcrypt_nif.so",
%% ["c_src/*.c"]}]}.
{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"}
]}.
{port_specs, [{"priv/bcrypt_nif.so", ["c_src/*.c"]}]}.
%% These post_hooks are for rebar2. rebar.config.script removes them if
%% rebar3 is detected
{post_hooks,
[{clean, "make -C c_src clean"},
{compile, "make -C c_src"}]}.
%% plugins and provider_hooks are for rebar3. rebar.config.script removes them
%% if rebar2 is detected
{plugins, [pc]}.
{provider_hooks, [
{pre, [
{compile, {pc, compile}},
{clean, {pc, clean}}
]}
]}.