diff options
author | Loïc Hoguin <[email protected]> | 2015-06-07 22:27:44 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-06-07 22:27:44 +0300 |
commit | 33e84bc0660f515f99835153840b2e179eaf4a84 (patch) | |
tree | 8d269b7918eaf67e65ef06369e19d227950883b3 | |
parent | 036b46bf00fb1180ca8fdb9865a93472f49773d5 (diff) | |
download | erlang.mk-33e84bc0660f515f99835153840b2e179eaf4a84.tar.gz erlang.mk-33e84bc0660f515f99835153840b2e179eaf4a84.tar.bz2 erlang.mk-33e84bc0660f515f99835153840b2e179eaf4a84.zip |
Fix NIF compilation under OSX
-rw-r--r-- | core/deps.mk | 4 |
1 files changed, 4 insertions, 0 deletions
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", |