-
Notifications
You must be signed in to change notification settings - Fork 1
/
rebar.config
48 lines (41 loc) · 1.76 KB
/
rebar.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{erl_opts, [debug_info]}.
{cover_enabled, true}.
{deps, [
{lager, "((3|2)\\.|1\\.0|1\\.2).*", {git, "git://github.com/basho/lager", {branch, "master"}}}
]}.
%% Port-driver / NIF compiler setup for MSVC
{port_env, [
{"CC", "cl.exe"},
{"CFLAGS", "/nologo /c /W4 /WX /MD /Ox $ERL_CFLAGS $SUPPRESS_WARNINGS"},
{"DRV_CC_TEMPLATE", "$CC $CFLAGS $PORT_IN_FILES /Fo$PORT_OUT_FILE"},
{"LDFLAGS", "/nologo /LIBPATH:$ERL_EI_LIBDIR erl_interface_md.lib ei_md.lib /DLL $LIBS"},
{"DRV_LINK_TEMPLATE", "link.exe $PORT_IN_FILES $RESOURCES $LDFLAGS /OUT:$PORT_OUT_FILE"}
]}.
{port_specs, [
{"win32", "priv/lib/nt_eventlog.dll", ["c_src/nif_winapi.c",
"c_src/registry_helpers.c",
"c_src/nt_eventlog.c"], [
{env, [
{"SUPPRESS_WARNINGS", "/wd4706 /wd4127 /wd4100"},
{"RESOURCES", "c_src\\lager_categories.res"},
{"LIBS", "advapi32.lib"}
]}
]}
]}.
%% Trick the code path into being able to find this app's priv_dir
{lib_dirs, ["../.."]}.
{pre_hooks, [
% Compile the mc file into an rc file
{compile, "mc -h c_src -r c_src c_src\\lager_categories.mc"},
% Compile the rc file into an res file so we can link against it
{compile, "rc /nologo c_src\\lager_categories.rc"}
]}.
{post_hooks, [
{compile, "del priv\\lib\\*.exp priv\\lib\\*.lib"},
{clean, "if exist priv\\lib rmdir /s /q priv\\lib"},
{clean, "if exist c_src\\lager_categories.h del c_src\\lager_categories.h"},
{clean, "if exist c_src\\lager_categories.r* del c_src\\lager_categories.r*"},
{clean, "if exist c_src\\MSG*.bin del c_src\\MSG*.bin"}
]}.
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et