aboutsummaryrefslogtreecommitdiff
path: root/src/mod_irc/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_irc/Makefile.in')
-rw-r--r--src/mod_irc/Makefile.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mod_irc/Makefile.in b/src/mod_irc/Makefile.in
index 0a7cd5677..a206027d5 100644
--- a/src/mod_irc/Makefile.in
+++ b/src/mod_irc/Makefile.in
@@ -6,6 +6,13 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ @ERLANG_LIBS@ @LIBICONV@
+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 = ../iconv_erl.so
@@ -28,7 +35,7 @@ $(OUTDIR)/%.beam: %.erl
$(ERLSHLIBS): ../%.so: %.c
$(CC) -Wall $(INCLUDES) $(CFLAGS) $(LDFLAGS) \
$(subst ../,,$(subst .so,.c,$@)) $(LIBS) \
- -o $@ -fpic -shared
+ -o $@ $(DYNAMIC_LIB_CFLAGS)
clean:
rm -f $(OBJS) $(ERLSHLIBS)