aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-01 01:58:20 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-01 01:58:20 +0000
commit4ec708d94989039ec736b39246082336700c065c (patch)
tree02f5a1eb88ae0b8e02c199343641d696809d68b6 /Makefile
parent5370637c14a428d0046fe0158dd773ccd69e6f6b (diff)
correctly fix build issues on Mac OSX Tiger by using a more generic means
for determining wheter poll and dlfcn functionality needs to be provided git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6707 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f704a6bd3..059b499a1 100755
--- a/Makefile
+++ b/Makefile
@@ -214,7 +214,6 @@ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
utils.o
ifeq (${OSARCH},Darwin)
-OBJS+=poll.o dlfcn.o
ASTLINK=-Wl,-dynamic
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
else
@@ -222,11 +221,19 @@ ASTLINK=-Wl,-E
SOLINK=-shared -Xlinker -x
endif
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
+ OBJS+= poll.o
+ CFLAGS+=-DPOLLCOMPAT
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
+ OBJS+= dhfcn.o
+ CFLAGS+=-DDLFCNCOMPAT
+endif
+
CC=gcc
INSTALL=install
-CFLAGS+=$(shell if uname -r|grep -q 8.2.0 ; then echo " -DOSX10_4 " ; fi)
-
_all: all
@echo " +--------- Asterisk Build Complete ---------+"
@echo " + Asterisk has successfully been built, but +"