Skip to content

Instantly share code, notes, and snippets.

@darrik
Created June 19, 2013 02:29
Show Gist options
  • Save darrik/5811255 to your computer and use it in GitHub Desktop.
Save darrik/5811255 to your computer and use it in GitHub Desktop.
Rebar config for using mingw as compiler on windows ($HOME/.rebar/config)
%% -*- erlang -*-
{port_env, [{"win32", "CC", "gcc.exe"},
{"win32", "LINKER", "ld.exe"},
{"win32", "CFLAGS", "-O3 -march=native $ERL_CFLAGS"},
{"win32", "DRV_CFLAGS", "-g -Wall $ERL_CFLAGS"},
{"win32", "DRV_LDFLAGS", "-shared $ERL_LDFLAGS"},
{"win32", "DRV_CC_TEMPLATE", "$CC -c $CFLAGS $DRV_CFLAGS $PORT_IN_FILES -o $PORT_OUT_FILE"},
{"win32", "DRV_LINK_TEMPLATE", "$LINKER $PORT_IN_FILES $LDFLAGS $DRV_LDFLAGS -o $PORT_OUT_FILE"},
{"win32", "ERL_LDFLAGS", " -L$ERL_EI_LIBDIR -lerl_interface -lei"}
]}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment