Merge branch 'rebar-config-cleanup-for-master'
diff --git a/Makefile b/Makefile
index 7bca978..008787d 100644
--- a/Makefile
+++ b/Makefile
@@ -9,3 +9,4 @@
 clean:
 	@rebar clean
 
+.PHONY: clean compile tests
diff --git a/c_src/Makefile b/c_src/Makefile
index 86fcca6..a4bcd32 100644
--- a/c_src/Makefile
+++ b/c_src/Makefile
@@ -1,6 +1,9 @@
-compile:
-	env
-	$(CC) $(CFLAGS) $(ERL_CFLAGS) $(EXE_LDFLAGS) bcrypt_port.c bcrypt.o blowfish.o -o ../priv/bcrypt
+compile: ../priv/bcrypt
+
+../priv/bcrypt:
+	$(CC) $(CFLAGS) $(ERL_CFLAGS) $(EXE_LDFLAGS) bcrypt_port.c bcrypt.o blowfish.o $(LDFLAGS) $(ERL_LDFLAGS) -lpthread -o ../priv/bcrypt
 
 clean:
 	@rm -f ../priv/bcrypt
+
+.PHONY: clean compile