aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-26 18:50:49 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-26 18:50:49 +0000
commitf9db8abd4d1bfa16f4135638c600ba0eaadec083 (patch)
tree7d179763d95152f24ed90027acafdc363c2afcef /Makefile
parent6b2aaaa721016826b533a71fb162df76db99fecc (diff)
Make it build and run on MacOS X
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1673 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 34c4382c1..881d1fa1d 100755
--- a/Makefile
+++ b/Makefile
@@ -95,7 +95,6 @@ ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-
MODULES_DIR=$(ASTLIBDIR)/modules
AGI_DIR=$(ASTVARLIBDIR)/agi-bin
@@ -158,6 +157,15 @@ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \
dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
astmm.o enum.o srv.o dns.o
+ifeq (${OSARCH},Darwin)
+OBJS+=poll.o dlfcn.o
+ASTLINK=-Wl,-dynamic
+SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
+else
+ASTLINK=-Wl,-E
+SOLINK=-shared -Xlinker -x
+endif
+
CC=gcc
INSTALL=install
@@ -224,7 +232,7 @@ stdtime/libtime.a: FORCE
fi
asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
- $(CC) $(DEBUG) -o asterisk -Wl,-E $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
+ $(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
subdirs:
for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done