Makefile.openbsd 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # FreeSWITCH auto-build Makefile (OpenBSD 5.x)
  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. #
  9. PKG=rsync-3.1.0 git automake-1.14.1 autoconf-2.69p1 libtool gmake bzip2 jpeg wget pcre speex libldns
  10. PREFIX=/usr/local/freeswitch
  11. DOWNLOAD=http://files.freeswitch.org/downloads/libs
  12. OPENSSL=1.0.1j
  13. LIBEDIT=20140618-3.1
  14. CURL=7.35.0
  15. freeswitch: has-git deps freeswitch.git/Makefile
  16. cd freeswitch.git && AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 LIBTOOL=/usr/local/bin/libtoolize gmake
  17. freeswitch.git/Makefile: freeswitch.git/configure
  18. cd freeswitch.git && PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig ./configure LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' --prefix=$(PREFIX)
  19. freeswitch.git/configure: freeswitch.git/bootstrap.sh
  20. cd freeswitch.git && AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 LIBTOOL=/usr/local/bin/libtoolize sh bootstrap.sh
  21. freeswitch.git/bootstrap.sh: has-git
  22. test -d freeswitch.git || git clone https://github.com/signalwire/freeswitch.git freeswitch.git
  23. install:
  24. cd freeswitch.git && AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 LIBTOOL=/usr/local/bin/libtoolize gmake install cd-sounds-install cd-moh-install
  25. clean:
  26. @rm -rf openssl* ldns* jpeg* pcre* perl* pkg-config* speex* sqlite* libedit* curl* *~
  27. (cd freeswitch.git && git clean -fdx && git reset --hard HEAD && git pull)
  28. has-git:
  29. @git --version || PKG_PATH=http://openbsd.mirrors.pair.com/`uname -r`/packages/`machine -a`/ pkg_add -r git
  30. deps: libedit openssl curl
  31. @PKG_PATH=http://openbsd.mirrors.pair.com/`uname -r`/packages/`machine -a`/ pkg_add -r $(PKG)
  32. openssl: openssl-$(OPENSSL)/.done
  33. openssl-$(OPENSSL)/.done: openssl-$(OPENSSL)
  34. openssl-$(OPENSSL):
  35. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  36. (cd $@ && ./Configure --prefix=$(PREFIX) BSD-x86_64 shared && make && sudo make install && touch .done)
  37. libedit: libedit-$(LIBEDIT)/Makefile
  38. libedit-$(LIBEDIT)/Makefile: libedit-$(LIBEDIT)
  39. libedit-$(LIBEDIT):
  40. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  41. (cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install)
  42. curl: curl-$(CURL)/.done
  43. curl-$(CURL)/.done: curl-$(CURL)
  44. curl-$(CURL):
  45. (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
  46. (rm -rf $(PREFIX)/lib/libcurl.*)
  47. (cd $@ && PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig:$PKG_CONFIG_PATH LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath-link=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)