Current section

Files

Jump to
iommap rebar.config
Raw

rebar.config

{erl_opts, [debug_info, warnings_as_errors]}.
{plugins, [pc]}.
{project_plugins, [rebar3_ex_doc]}.
{hex, [
{doc, #{provider => ex_doc}}
]}.
{provider_hooks, [
{pre, [
{compile, {pc, compile}},
{clean, {pc, clean}}
]}
]}.
{port_specs, [
{"priv/iommap_nif.so", [
"c_src/iommap_nif.c",
"c_src/iommap_resource.c",
"c_src/iommap_ops.c",
"c_src/iommap_atoms.c",
"c_src/iommap_platform.c"
]}
]}.
{port_env, [
{"CFLAGS", "$CFLAGS -std=c11 -Wall -Wextra -Werror -O2 -fPIC"},
{"LDFLAGS", "$LDFLAGS -lpthread"},
%% Linux specific
{"linux", "CFLAGS", "$CFLAGS -D_GNU_SOURCE"},
%% macOS specific
{"darwin", "LDFLAGS", "$LDFLAGS -flat_namespace -undefined suppress"}
]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
{profiles, [
{test, [
{erl_opts, [debug_info, nowarn_export_all]},
%% Build the test-only helper NIF used by
%% iommap_two_nif_tests. The script is shipped under test/
%% (excluded from hex), so this hook is a no-op outside the
%% repo working tree.
{pre_hooks, [{compile, "sh test/build_helper.sh"}]}
]}
]}.
{ex_doc, [
{extras, [
{"README.md", #{title => "Overview"}},
{"guides/features.md", #{title => "Features & API"}},
{"CHANGELOG.md", #{title => "Changelog"}},
{"LICENSE", #{title => "License"}}
]},
{main, "README.md"},
{homepage_url, "https://github.com/benoitc/erlang-iommap"},
{source_url, "https://github.com/benoitc/erlang-iommap"}
]}.