This repository has been archived by the owner. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Update to latest rebar which passes environment through to port compi…
…lation
- Loading branch information
Hunter Morris
committed
Apr 27, 2011
1 parent
296618e
commit fad926f1c06e85e1461799feef94ea9acb23b396
Showing
2 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*- | ||
{erl_opts, [debug_info]}. | ||
|
||
{so_specs, | ||
[{"priv/bcrypt_nif.so", | ||
["c_src/blowfish.c", "c_src/bcrypt.c", "c_src/bcrypt_nif.c"]}]}. | ||
|
||
{erl_opts, [debug_info]}. | ||
|
||
% This ugly hack is necessary because rebar's supported pre and post hooks | ||
% don't include the environment vars necessary for building port programs. | ||
{port_pre_script, {"echo -e \"#!/bin/sh\\n$CC $CFLAGS $ERL_CFLAGS " | ||
"c_src/bcrypt_port.c c_src/bcrypt.o c_src/blowfish.o " | ||
"$LDFLAGS $ERL_LDFLAGS -lpthread " | ||
"-o priv/bcrypt\" > build_port.sh", | ||
"build_port.sh"}}. | ||
{pre_hooks, [{clean, "rm -f priv/bcrypt build_port.sh"}]}. | ||
{post_hooks, [{compile, "sh build_port.sh"}]}. | ||
{post_hooks, | ||
[{clean, "rm -f priv/bcrypt"}, | ||
{compile, | ||
"$CC $CFLAGS $ERL $ERL_CFLAGS " | ||
"c_src/bcrypt_port.c c_src/bcrypt.o c_src/blowfish.o " | ||
"$LDFLAGS $ERL_LDFLAGS -lpthread " | ||
"-o priv/bcrypt"}]}. |