Makefile.centos5 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #
  2. # FreeSWITCH auto-build Makefile (CentOS 5.10 Wingardium Leviosa Edition)
  3. # http://www.freeswitch.org
  4. # put this file anywhere and type make to
  5. # create a fully-built freeswitch.git from scratch
  6. # in that same directory.
  7. #
  8. # Brian West <brian@freeswitch.org>
  9. #
  10. FSPREFIX=/usr/local/freeswitch
  11. PREFIX=/usr/local/freeswitch
  12. DOWNLOAD=http://files.freeswitch.org/downloads/libs
  13. JPEG=v8d
  14. OPENSSL=1.0.1l
  15. SQLITE=autoconf-3080403
  16. PCRE=8.35
  17. CURL=7.40.0
  18. SPEEX=1.2rc1
  19. LIBEDIT=20140618-3.1
  20. LDNS=1.6.17
  21. freeswitch: deps has-git freeswitch.git/Makefile
  22. cd freeswitch.git && make
  23. freeswitch.git/Makefile: freeswitch.git/configure
  24. cd freeswitch.git && PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig ./configure LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' --prefix=$(FSPREFIX)
  25. freeswitch.git/configure: freeswitch.git/bootstrap.sh
  26. cd freeswitch.git && sh bootstrap.sh
  27. freeswitch.git/bootstrap.sh: has-git
  28. test -d freeswitch.git || git clone https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch.git
  29. install: freeswitch
  30. cd freeswitch.git && make install cd-sounds-install cd-moh-install
  31. install-git: .done
  32. .done:
  33. 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
  34. yum update -y
  35. yum install -y git gcc-c++ wget ncurses-devel zlib-devel e2fsprogs-devel libtool automake autoconf
  36. touch .done
  37. has-git:
  38. @git --version || (echo "please install git by running 'make install-git'" && false)
  39. clean:
  40. @rm -rf openssl* ldns* jpeg* pcre* perl* pkg-config* speex* sqlite* libedit* curl* *~
  41. (cd freeswitch.git && git clean -fdx && git reset --hard HEAD && git pull)
  42. libjpeg: jpeg-8d/.done
  43. jpeg-8d/.done:
  44. (test -d jpeg-8d) || (wget -4 -O jpegsrc.$(JPEG).tar.gz $(DOWNLOAD)/jpegsrc.$(JPEG).tar.gz && tar zxfv jpegsrc.$(JPEG).tar.gz)
  45. (cd jpeg-8d && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
  46. openssl: openssl-$(OPENSSL)/.done
  47. openssl-$(OPENSSL)/.done: openssl-$(OPENSSL)
  48. openssl-$(OPENSSL):
  49. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  50. (cd $@ && ./Configure --prefix=$(PREFIX) linux-x86_64 shared && make && sudo make install && touch .done)
  51. sqlite: sqlite-$(SQLITE)/.done
  52. sqlite-$(SQLITE)/.done: sqlite-$(SQLITE)
  53. sqlite-$(SQLITE):
  54. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  55. (cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done_sqlite && touch .done)
  56. pcre: pcre-$(PCRE)/.done
  57. pcre-$(PCRE)/.done: pcre-$(PCRE)
  58. pcre-$(PCRE):
  59. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  60. (cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
  61. curl: curl-$(CURL)/.done
  62. curl-$(CURL)/.done: curl-$(CURL)
  63. curl-$(CURL):
  64. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  65. (cd $@ && ./configure LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' --prefix=$(PREFIX) && make && sudo make install && touch .done)
  66. speex: speex-$(SPEEX)/.done
  67. speex-$(SPEEX)/.done: speex-$(SPEEX)
  68. speex-$(SPEEX):
  69. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  70. (cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
  71. libedit: libedit-$(LIBEDIT)/.done
  72. libedit-$(LIBEDIT)/.done: libedit-$(LIBEDIT)
  73. libedit-$(LIBEDIT):
  74. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  75. (cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
  76. ldns: ldns-$(LDNS)/.done
  77. ldns-$(LDNS)/.done: ldns-$(LDNS)
  78. ldns-$(LDNS):
  79. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  80. (cd $@ && ./configure --with-ssl=$(PREFIX) --prefix=$(PREFIX) && make && sudo make install && touch .done)
  81. deps: libjpeg openssl sqlite pcre curl speex libedit ldns