You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.6KB

  1. LOCAL = $(PWD)
  2. # Arch-specifics
  3. include ../Makefile-arch.inc
  4. ifeq ($(ARCH),mac)
  5. export CFLAGS = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk \
  6. -mmacosx-version-min=10.7
  7. export CXXFLAGS = $(CFLAGS)
  8. export LDFLAGS = $(CFLAGS)
  9. endif
  10. # Commands
  11. WGET = wget -nc
  12. UNTAR = tar xf
  13. UNZIP = unzip
  14. # Packages
  15. glew = glew-2.1.0
  16. glfw = glfw-3.2.1
  17. jansson = jansson-2.10
  18. libsamplerate = libsamplerate-0.1.9
  19. libcurl = curl-7.54.1
  20. libzip = libzip-1.2.0
  21. portmidi = portmidi
  22. portaudio = portaudio
  23. .NOTPARALLEL:
  24. all: $(glew) $(glfw) $(jansson) $(libsamplerate) $(libcurl) $(libzip) $(portmidi) $(portaudio)
  25. $(glew):
  26. $(WGET) https://downloads.sourceforge.net/project/glew/glew/$(patsubst glew-%,%,$@)/$@.tgz
  27. $(UNTAR) $@.tgz
  28. $(MAKE) -C $@
  29. ln -s lib lib64
  30. $(MAKE) -C $@ GLEW_DEST="$(LOCAL)" install
  31. rm lib64
  32. $(glfw):
  33. $(WGET) https://github.com/glfw/glfw/releases/download/$(patsubst glfw-%,%,$@)/$@.zip
  34. $(UNZIP) $@.zip
  35. cd $@ && cmake . \
  36. -DCMAKE_INSTALL_PREFIX="$(LOCAL)" -DBUILD_SHARED_LIBS=ON \
  37. -DGLFW_USE_CHDIR=ON -DGLFW_USE_MENUBAR=ON -DGLFW_USE_RETINA=ON
  38. $(MAKE) -C $@
  39. $(MAKE) -C $@ install
  40. $(jansson):
  41. $(WGET) http://www.digip.org/jansson/releases/$@.tar.gz
  42. $(UNTAR) $@.tar.gz
  43. cd $@ && ./configure --prefix="$(LOCAL)"
  44. $(MAKE) -C $@
  45. $(MAKE) -C $@ install
  46. $(libsamplerate):
  47. $(WGET) http://www.mega-nerd.com/SRC/$@.tar.gz
  48. $(UNTAR) $@.tar.gz
  49. cd $@ && ./configure --prefix="$(LOCAL)"
  50. $(MAKE) -C $@
  51. $(MAKE) -C $@ install
  52. $(libcurl):
  53. $(WGET) https://curl.haxx.se/download/$@.tar.gz
  54. $(UNTAR) $@.tar.gz
  55. cd $@ && ./configure --prefix="$(LOCAL)" \
  56. --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual \
  57. --without-zlib --without-ssl --without-ca-bundle --without-ca-path --without-ca-fallback --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2
  58. $(MAKE) -C $@
  59. $(MAKE) -C $@ install
  60. $(libzip):
  61. $(WGET) https://nih.at/libzip/$@.tar.gz
  62. $(UNTAR) $@.tar.gz
  63. cd $@ && ./configure --prefix="$(LOCAL)"
  64. $(MAKE) -C $@
  65. $(MAKE) -C $@ install
  66. $(portmidi):
  67. git clone https://github.com/AndrewBelt/portmidi.git $@
  68. # TODO Fix on Windows
  69. cd $@ && cmake . -DCMAKE_INSTALL_PREFIX="$(LOCAL)"
  70. $(MAKE) -C $@
  71. $(MAKE) -C $@ install
  72. $(portaudio):
  73. $(WGET) http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
  74. $(UNTAR) pa_stable_v190600_20161030.tgz
  75. cd $@ && ./configure --prefix="$(LOCAL)"
  76. $(MAKE) -C $@
  77. $(MAKE) -C $@ install
  78. clean:
  79. git clean -fdxi