%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
{require_min_otp_vsn, "18"}.

{sub_dirs, ["rel"]}.

{erl_opts, [{src_dirs, ["src", "examples/src"]}]}.

{port_env, [{"CFLAGS", "$CFLAGS -g -O3 -Wall"},
            {"x86_64", "CFLAGS", "$CFLAGS -m$ERLANG_ARCH"},
            {"x86_64", "LDFLAGS", "-m$ERLANG_ARCH $LDFLAGS"},
            {"i[36]86", "CFLAGS", "$CFLAGS -m$ERLANG_ARCH"},
            {"i[36]86", "LDFLAGS", "-m$ERLANG_ARCH $LDFLAGS"}
           ]}.

{port_specs, [{"priv/lib/epam.so", ["c_src/epam.c"]},
              {"priv/lib/setuid_drv.so", ["c_src/setuid_drv.c"]}]}.

{pre_hooks, [{compile, "./scripts/rebar-pre-script"},
             {clean, "./scripts/rebar-pre-script clean"}]}.
