From 0f11e62b647c735bb13f957eeec9586be7e7b51a Mon Sep 17 00:00:00 2001
From: Brujo Benavides <elbrujohalcon@inaka.net>
Date: Sat, 28 Nov 2015 13:50:57 -0300
Subject: Fix for bcrypt compilation on OSX El Capitan

---
 core/deps.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/deps.mk b/core/deps.mk
index 34c4d7b..166b4de 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -412,9 +412,10 @@ define dep_autopatch_rebar.erl
 					Output, ": $$\(foreach ext,.c .C .cc .cpp,",
 						"$$\(patsubst %$$\(ext),%.o,$$\(filter %$$\(ext),$$\(wildcard", Input, "))))\n",
 					"\t$$\(CC) -o $$\@ $$\? $$\(LDFLAGS) $$\(ERL_LDFLAGS) $$\(DRV_LDFLAGS) $$\(EXE_LDFLAGS)",
-					case filename:extension(Output) of
-						[] -> "\n";
-						_ -> " -shared\n"
+					case {filename:extension(Output), $(PLATFORM)} of
+					    {[], _} -> "\n";
+					    {_, darwin} -> "\n";
+					    _ -> " -shared\n"
 					end])
 			end,
 			[PortSpec(S) || S <- PortSpecs]
-- 
cgit v1.2.3