{port_specs, [
    {"priv/jiffy.so", [
        "c_src/*.c",
        "c_src/*.cc",
        "c_src/double-conversion/*.cc"
    ]}
]}.

{port_env, [
    % Drop -lerl_interface
    {"ERL_LDFLAGS", " -L$ERL_EI_LIBDIR -lei"},
    {"win32", "ERL_LDFLAGS", " /LIBPATH:$ERL_EI_LIBDIR ei.lib"},

    {".*", "FLTO_FLAG", ""},

    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
        "CFLAGS", "$CFLAGS -Ic_src/ -g -Wall $FLTO_FLAG -Werror -O3"},
    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
        "CXXFLAGS", "$CXXFLAGS -Ic_src/ -g -Wall $FLTO_FLAG -Werror -O3"},

    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
        "LDFLAGS", "$LDFLAGS $FLTO_FLAG -lstdc++"},

    {"win32", "CXXFLAGS", "$CXXFLAGS /O2 /DNDEBUG"}
]}.

{eunit_opts, [
    verbose
]}.
