aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-20 16:22:59 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-20 16:22:59 +0000
commit2d5808052d95a3aa89ee49c718a9eca181209d94 (patch)
tree2b4f3911bda14c64061bbaad9c23d753f859c163 /Makefile
parenta26db084f29a92793f5984e267bdf02487d7a171 (diff)
Fix mpg123 build on non-linux (bug #3385)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4853 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9d9342dee..821aa612b 100755
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,7 @@ OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1
OPTIONS+=-fomit-frame-pointer
endif
+MPG123TARG=linux
endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
@@ -151,11 +152,13 @@ CFLAGS+=$(shell if test ${OSVERSION} -lt 500016 ; then echo "-D_THREAD_SAFE"; fi
LIBS+=$(shell if test ${OSVERSION} -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
INCLUDE+=-I/usr/local/include
CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi)
+MPG123TARG=freebsd
endif # FreeBSD
ifeq (${OSARCH},NetBSD)
CFLAGS+=-pthread
INCLUDE+=-I/usr/local/include -I/usr/pkg/include
+MPG123TARG=netbsd
endif
ifeq (${OSARCH},OpenBSD)
@@ -334,7 +337,7 @@ clean:
rm -f ast_expr.c
rm -f .version
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
- @if [ -d mpg123-0.59r ]; then make -C mpg123-0.59r clean; fi
+ @if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
$(MAKE) -C db1-ast clean
$(MAKE) -C stdtime clean
@@ -429,7 +432,7 @@ bininstall: all
echo "You need to do cvs update -d not just cvs update" ; \
fi
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
- if [ -f mpg123-0.59r/mpg123 ]; then make -C mpg123-0.59r install; fi
+ if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@@ -555,7 +558,7 @@ mpg123:
@wget -V >/dev/null || (echo "You need wget" ; false )
[ -f mpg123-0.59r.tar.gz ] || wget http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
[ -d mpg123-0.59r ] || tar xfz mpg123-0.59r.tar.gz
- make -C mpg123-0.59r linux
+ $(MAKE) -C mpg123-0.59r $(MPG123TARG)
config:
if [ -d /etc/rc.d/init.d ]; then \
@@ -579,7 +582,7 @@ depend: .depend
FORCE:
%_env:
- make -C $(shell echo $@ | sed "s/_env//g") env
+ $(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
env:
env
@@ -591,6 +594,6 @@ env:
cleantest:
if ! cmp -s .cleancount .lastclean ; then \
- make clean; cp -f .cleancount .lastclean;\
+ $(MAKE) clean; cp -f .cleancount .lastclean;\
fi