Current section

Files

Jump to
erlzmq_dnif rebar.config
Raw

rebar.config

{erl_opts, [debug_info, warnings_as_errors]}.
{deps, []}.
{project_plugins, [rebar3_hex]}.
%% Compile nif using port compiler plugin
{plugins, [{pc, "~> 1.15"}]}.
{artifacts, ["priv/erlzmq_nif.so"]}.
{port_env, [
%% Base flags for all platforms
{"CFLAGS", "$CFLAGS -I/usr/local/include -I./include -g -Wall -Werror"},
{"LDFLAGS", "$LDFLAGS -L/usr/local/lib -lzmq"},
%% macOS: add Homebrew paths (works for both Intel /usr/local and ARM /opt/homebrew)
{"darwin", "CFLAGS", "$CFLAGS -I/opt/homebrew/include"},
{"darwin", "LDFLAGS", "$LDFLAGS -L/opt/homebrew/lib"},
%% macOS: fix linker flags for modern macOS (Darwin 20+)
{"darwin", "DRV_LDFLAGS", "-bundle -flat_namespace -undefined dynamic_lookup $ERL_LDFLAGS"}
]}.
{port_specs, [{ "priv/erlzmq_nif.so", ["c_src/*.c"] }]}.
%% {profiles, [
%% {docs, [{edoc_opts, [{preprocess, true},
%% {doclet, edoc_doclet_chunks},
%% {layout, edoc_layout_chunks},
%% {dir, "_build/default/lib/erlzmq/doc"}]}
%% ]}
%% ]}.
{provider_hooks,
[
{pre,
[
{compile, {pc, compile}},
{clean, {pc, clean}}
]
}
]
}.
{eunit_opts, [
verbose
]}.
{hex, [
{doc, #{provider => edoc}}
]}.