
This change will prevent users from having to download rebar3_hex and all of it's dependencies.
40 lines
1.4 KiB
Erlang
40 lines
1.4 KiB
Erlang
{erl_opts, [debug_info]}.
|
|
|
|
{plugins, [pc]}.
|
|
|
|
{project_plugins, [rebar3_hex]}.
|
|
|
|
{provider_hooks, [
|
|
{pre, [
|
|
{compile, {pc, compile}},
|
|
{clean, {pc, clean}}
|
|
]}
|
|
]}.
|
|
|
|
{port_specs, [
|
|
{"priv/enacl_nif.so", [
|
|
"c_src/*.c"
|
|
]}
|
|
]}.
|
|
|
|
{port_env, [
|
|
{"darwin", "CFLAGS", "$CFLAGS -fPIC -O3 -std=c99 -arch x86_64 -finline-functions -Wall -Wmissing-prototypes"},
|
|
{"darwin", "CXXFLAGS", "$CXXFLAGS -fPIC -O3 -arch x86_64 -finline-functions -Wall"},
|
|
{"darwin", "LDFLAGS", "$LDFLAGS -arch x86_64 -flat_namespace -undefined suppress -lsodium"},
|
|
|
|
{"linux", "CFLAGS", "$CFLAGS -fPIC -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes"},
|
|
{"linux", "CXXFLAGS", "$CXXFLAGS -fPIC -O3 -finline-functions -Wall"},
|
|
{"linux", "LDFLAGS", "$LDFLAGS -lsodium"},
|
|
|
|
{"freebsd", "CFLAGS", "$CFLAGS -fPIC -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -I /usr/local/include"},
|
|
{"freebsd", "CXXFLAGS", "$CXXFLAGS -fPIC -O3 -finline-functions -Wall"},
|
|
{"freebsd", "LDFLAGS", "$LDFLAGS -fPIC -L /usr/local/lib -lsodium"},
|
|
|
|
{"solaris", "CFLAGS", "$CFLAGS -fPIC -m64 -I/opt/local/include -O2 -std=c99 -finline-functions -Wall -Wmissing-prototypes"},
|
|
{"solaris", "CXXFLAGS", "$CXXFLAGS -fPIC -O2 -finline-function -Wall"},
|
|
{"solaris", "LDFLAGS", "$LDFLAGS -m64 -fPIC -L /opt/local/lib -lsodium"},
|
|
|
|
{"win32", "CFLAGS", "$CFLAGS /LD /O2 /DNDEBUG"},
|
|
{"win32", "LDFLAGS", "$LDFLAGS libsodium.dll.a"}
|
|
]}.
|