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.7KB

  1. LOCAL = $(PWD)
  2. # Arch-specifics
  3. include ../arch.mk
  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. # On Linux, default lib path is lib64, so change it back to lib.
  30. $(MAKE) -C $@ GLEW_DEST="$(LOCAL)" LIBDIR="$(LOCAL)/lib" install
  31. $(glfw):
  32. $(WGET) https://github.com/glfw/glfw/releases/download/$(patsubst glfw-%,%,$@)/$@.zip
  33. $(UNZIP) $@.zip
  34. cd $@ && cmake . \
  35. -DCMAKE_INSTALL_PREFIX="$(LOCAL)" -DBUILD_SHARED_LIBS=ON \
  36. -DGLFW_USE_CHDIR=ON -DGLFW_USE_MENUBAR=ON -DGLFW_USE_RETINA=ON
  37. $(MAKE) -C $@
  38. $(MAKE) -C $@ install
  39. $(jansson):
  40. $(WGET) http://www.digip.org/jansson/releases/$@.tar.gz
  41. $(UNTAR) $@.tar.gz
  42. cd $@ && ./configure --prefix="$(LOCAL)"
  43. $(MAKE) -C $@
  44. $(MAKE) -C $@ install
  45. $(libsamplerate):
  46. $(WGET) http://www.mega-nerd.com/SRC/$@.tar.gz
  47. $(UNTAR) $@.tar.gz
  48. cd $@ && ./configure --prefix="$(LOCAL)"
  49. $(MAKE) -C $@
  50. $(MAKE) -C $@ install
  51. $(libcurl):
  52. $(WGET) https://curl.haxx.se/download/$@.tar.gz
  53. $(UNTAR) $@.tar.gz
  54. cd $@ && ./configure --prefix="$(LOCAL)" \
  55. --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 \
  56. --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
  57. $(MAKE) -C $@
  58. $(MAKE) -C $@ install
  59. $(libzip):
  60. $(WGET) https://nih.at/libzip/$@.tar.gz
  61. $(UNTAR) $@.tar.gz
  62. cd $@ && ./configure --prefix="$(LOCAL)"
  63. $(MAKE) -C $@
  64. $(MAKE) -C $@ install
  65. $(portmidi):
  66. git clone https://github.com/AndrewBelt/portmidi.git $@
  67. # TODO Fix on Windows
  68. cd $@ && cmake . -DCMAKE_INSTALL_PREFIX="$(LOCAL)"
  69. $(MAKE) -C $@
  70. $(MAKE) -C $@ install
  71. $(portaudio):
  72. $(WGET) http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
  73. $(UNTAR) pa_stable_v190600_20161030.tgz
  74. cd $@ && ./configure --prefix="$(LOCAL)"
  75. $(MAKE) -C $@
  76. $(MAKE) -C $@ install
  77. clean:
  78. git clean -fdxi