aboutsummaryrefslogtreecommitdiff
path: root/src/stringprep/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/stringprep/Makefile.in')
-rw-r--r--src/stringprep/Makefile.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stringprep/Makefile.in b/src/stringprep/Makefile.in
index 7717878a1..2d858cc2e 100644
--- a/src/stringprep/Makefile.in
+++ b/src/stringprep/Makefile.in
@@ -6,6 +6,13 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ @ERLANG_LIBS@
+ifeq ($(shell uname),Darwin)
+DYNAMIC_LIB_CFLAGS = -fPIC -bundle -flat_namespace -undefined suppress
+else
+# Assume Linux-style dynamic library flags
+DYNAMIC_LIB_CFLAGS = -fpic -shared
+endif
+
SUBDIRS =
ERLSHLIBS = ../stringprep_drv.so
@@ -26,7 +33,7 @@ $(OUTDIR)/%.beam: %.erl
$(ERLSHLIBS): ../%.so: %.c uni_data.c uni_norm.c
gcc -Wall -O2 $(CFLAGS) $(LDFLAGS) $(INCLUDES) \
$(subst ../,,$(subst .so,.c,$@)) $(LIBS) \
- -o $@ -fpic -shared
+ -o $@ $(DYNAMIC_LIB_CFLAGS)
clean:
rm -f $(OBJS) $(ERLSHLIBS)