From 33e84bc0660f515f99835153840b2e179eaf4a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 7 Jun 2015 22:27:44 +0300 Subject: Fix NIF compilation under OSX --- core/deps.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/deps.mk') diff --git a/core/deps.mk b/core/deps.mk index b9b6015..9a5fa9a 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -366,6 +366,10 @@ define dep_autopatch_rebar.erl Input = [[" ", I] || I <- Input0], PortSpecWrite([ [["\n", K, " = ", ShellToMk(V)] || {K, V} <- lists:reverse(MergeEnv(PortEnv))], + case $(PLATFORM) of + darwin -> "\n\nLDFLAGS += -flat_namespace -undefined suppress"; + _ -> "" + end, "\n\nall:: ", Output, "\n\n", "%.o: %.c\n\t$$$$\(CC) -c -o $$$$\@ $$$$\< $$$$\(CFLAGS) $$$$\(ERL_CFLAGS) $$$$\(DRV_CFLAGS) $$$$\(EXE_CFLAGS)\n\n", "%.o: %.C\n\t$$$$\(CXX) -c -o $$$$\@ $$$$\< $$$$\(CXXFLAGS) $$$$\(ERL_CFLAGS) $$$$\(DRV_CFLAGS) $$$$\(EXE_CFLAGS)\n\n", -- cgit v1.2.3