freeswitch/build/Makefile.centos5

100 lines
3.8 KiB
Makefile
Raw Normal View History

#
# FreeSWITCH auto-build Makefile (CentOS 5.10 Wingardium Leviosa Edition)
# http://www.freeswitch.org
# put this file anywhere and type make to
# create a fully-built freeswitch.git from scratch
# in that same directory.
#
# Brian West <brian@freeswitch.org>
#
FSPREFIX=/usr/local/freeswitch
2014-09-05 11:54:54 -04:00
PREFIX=/usr/local/freeswitch
2014-06-17 16:44:32 -04:00
DOWNLOAD=http://files.freeswitch.org/downloads/libs
JPEG=v8d
2015-02-16 10:17:20 -05:00
OPENSSL=1.0.1l
SQLITE=autoconf-3080403
PCRE=8.35
2015-02-16 10:17:20 -05:00
CURL=7.40.0
SPEEX=1.2rc1
2014-06-18 15:52:27 -04:00
LIBEDIT=20140618-3.1
LDNS=1.6.17
freeswitch: deps has-git freeswitch.git/Makefile
cd freeswitch.git && make
freeswitch.git/Makefile: freeswitch.git/configure
cd freeswitch.git && PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig ./configure LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' --prefix=$(FSPREFIX)
freeswitch.git/configure: freeswitch.git/bootstrap.sh
cd freeswitch.git && sh bootstrap.sh
freeswitch.git/bootstrap.sh: has-git
test -d freeswitch.git || git clone https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch.git
install: freeswitch
2014-07-22 16:19:40 -04:00
cd freeswitch.git && make install cd-sounds-install cd-moh-install
2014-06-17 16:24:55 -04:00
install-git: .done
.done:
rpm -i http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm || true
yum update -y
yum install -y git gcc-c++ wget ncurses-devel zlib-devel e2fsprogs-devel libtool automake autoconf
2014-06-17 16:24:55 -04:00
touch .done
2014-06-17 16:24:55 -04:00
has-git:
@git --version || (echo "please install git by running 'make install-git'" && false)
2014-06-17 15:35:12 -04:00
clean:
@rm -rf openssl* ldns* jpeg* pcre* perl* pkg-config* speex* sqlite* libedit* curl* *~
(cd freeswitch.git && git clean -fdx && git reset --hard HEAD && git pull)
2014-06-17 16:24:55 -04:00
libjpeg: jpeg-8d/.done
2014-06-17 16:24:55 -04:00
jpeg-8d/.done:
2014-06-17 16:44:32 -04:00
(test -d jpeg-8d) || (wget -4 -O jpegsrc.$(JPEG).tar.gz $(DOWNLOAD)/jpegsrc.$(JPEG).tar.gz && tar zxfv jpegsrc.$(JPEG).tar.gz)
2014-06-17 16:24:55 -04:00
(cd jpeg-8d && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
2014-06-17 16:24:55 -04:00
openssl: openssl-$(OPENSSL)/.done
openssl-$(OPENSSL)/.done: openssl-$(OPENSSL)
openssl-$(OPENSSL):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2014-06-17 16:24:55 -04:00
(cd $@ && ./Configure --prefix=$(PREFIX) linux-x86_64 shared && make && sudo make install && touch .done)
2014-06-17 16:24:55 -04:00
sqlite: sqlite-$(SQLITE)/.done
sqlite-$(SQLITE)/.done: sqlite-$(SQLITE)
sqlite-$(SQLITE):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2014-06-17 16:24:55 -04:00
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done_sqlite && touch .done)
2014-06-17 16:24:55 -04:00
pcre: pcre-$(PCRE)/.done
pcre-$(PCRE)/.done: pcre-$(PCRE)
pcre-$(PCRE):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2014-06-17 16:24:55 -04:00
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
2014-06-17 16:24:55 -04:00
curl: curl-$(CURL)/.done
curl-$(CURL)/.done: curl-$(CURL)
curl-$(CURL):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2015-02-16 10:17:20 -05:00
(cd $@ && ./configure LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' --prefix=$(PREFIX) && make && sudo make install && touch .done)
2014-06-17 16:24:55 -04:00
speex: speex-$(SPEEX)/.done
speex-$(SPEEX)/.done: speex-$(SPEEX)
speex-$(SPEEX):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2014-06-17 16:24:55 -04:00
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
2014-06-17 16:24:55 -04:00
libedit: libedit-$(LIBEDIT)/.done
libedit-$(LIBEDIT)/.done: libedit-$(LIBEDIT)
libedit-$(LIBEDIT):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2014-06-17 16:24:55 -04:00
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
2014-06-17 16:24:55 -04:00
ldns: ldns-$(LDNS)/.done
ldns-$(LDNS)/.done: ldns-$(LDNS)
2014-06-17 15:35:12 -04:00
ldns-$(LDNS):
2014-06-17 16:44:32 -04:00
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
2014-06-17 16:24:55 -04:00
(cd $@ && ./configure --with-ssl=$(PREFIX) --prefix=$(PREFIX) && make && sudo make install && touch .done)
deps: libjpeg openssl sqlite pcre curl speex libedit ldns