Permalink
Browse files

Merge remote-tracking branch 'origin/kas/unfubar'

  • Loading branch information...
seth committed Oct 9, 2012
2 parents 1464108 + 5c4a687 commit 33ade265236b5489d56e7f89b7f87817e82b7978
Showing with 21 additions and 13 deletions.
  1. +3 −3 Makefile
  2. +6 −0 c_src/Makefile
  3. BIN rebar
  4. +12 −10 rebar.config
View
@@ -1,11 +1,11 @@
all: compile
compile:
@ ./rebar compile
@rebar compile
tests:
@ ./rebar eunit
@rebar eunit
clean:
@ ./rebar clean
@rebar clean
View
@@ -0,0 +1,6 @@
compile:
env
$(CC) $(CFLAGS) $(ERL_CFLAGS) $(EXE_LDFLAGS) bcrypt_port.c bcrypt.o blowfish.o -o ../priv/bcrypt
clean:
@rm -f ../priv/bcrypt
View
BIN -102 KB rebar
Binary file not shown.
View
@@ -1,14 +1,16 @@
%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*-
{erl_opts, [debug_info]}.
%% {erl_opts, [debug_info]}.
{so_specs,
[{"priv/bcrypt_nif.so",
["c_src/blowfish.o", "c_src/bcrypt.o", "c_src/bcrypt_nif.o", "c_src/async_queue.o"]}]}.
%% {so_specs,
%% [{"priv/bcrypt_nif.so",
%% ["c_src/*.c"]}]}.
{port_env,
[{"DRV_LDFLAGS","-shared $ERL_LDFLAGS -lpthread"},
{"darwin", "DRV_LDFLAGS", "-bundle -flat_namespace -undefined suppress $ERL_LDFLAGS -lpthread"},
{"DRV_CFLAGS","-Ic_src -Wall -fPIC $ERL_CFLAGS"}]}.
{port_specs, [{"priv/bcrypt_nif.so", ["c_src/*.c"]}]}.
{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"}]}.
[{clean, "make -C c_src clean"},
{compile, "make -C c_src"}]}.

0 comments on commit 33ade26

Please sign in to comment.