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.

154 lines
4.2KB

  1. RACK_DIR ?= ..
  2. .NOTPARALLEL:
  3. # Target paths
  4. include $(RACK_DIR)/arch.mk
  5. ifeq ($(ARCH), lin)
  6. glew = lib/libGLEW.so
  7. glfw = lib/libglfw.so
  8. jansson = lib/libjansson.so
  9. libspeexdsp = lib/libspeexdsp.so
  10. libcurl = lib/libcurl.so
  11. libzip = lib/libzip.so
  12. rtmidi = lib/librtmidi.so
  13. rtaudio = lib/librtaudio.so
  14. openssl = lib/libssl.so
  15. endif
  16. ifeq ($(ARCH), mac)
  17. glew = lib/libGLEW.dylib
  18. glfw = lib/libglfw.dylib
  19. jansson = lib/libjansson.dylib
  20. libspeexdsp = lib/libspeexdsp.dylib
  21. libcurl = lib/libcurl.dylib
  22. libzip = lib/libzip.dylib
  23. rtmidi = lib/librtmidi.dylib
  24. rtaudio = lib/librtaudio.dylib
  25. openssl = lib/libssl.dylib
  26. endif
  27. ifeq ($(ARCH), win)
  28. glew = bin/glew32.dll
  29. glfw = bin/glfw3.dll
  30. jansson = bin/libjansson-4.dll
  31. libspeexdsp = bin/libspeexdsp-1.dll
  32. libcurl = bin/libcurl-4.dll
  33. libzip = bin/libzip-5.dll
  34. rtmidi = bin/librtmidi-4.dll
  35. rtaudio = bin/librtaudio.dll
  36. openssl = bin/libssl-1_1-x64.dll
  37. endif
  38. nanovg = include/nanovg.h
  39. nanosvg = include/nanosvg.h
  40. oui-blendish = include/blendish.h
  41. osdialog = include/osdialog.h
  42. DEPS += $(glew) $(glfw) $(jansson) $(libspeexdsp) $(libcurl) $(libzip) $(rtmidi) $(rtaudio) $(nanovg) $(nanosvg) $(oui-blendish) $(osdialog)
  43. include $(RACK_DIR)/dep.mk
  44. # Targets
  45. $(glew):
  46. $(WGET) https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz
  47. $(UNTAR) glew-2.1.0.tgz
  48. $(MAKE) -C glew-2.1.0 glew.lib
  49. # On Linux, default lib path is lib64, so change it back to lib.
  50. $(MAKE) -C glew-2.1.0 GLEW_DEST="$(realpath $(DEP_LOCAL))" LIBDIR="$(realpath $(DEP_LOCAL))/lib" install
  51. $(glfw):
  52. cd glfw && $(CMAKE) . \
  53. -DBUILD_SHARED_LIBS=ON \
  54. -DGLFW_COCOA_CHDIR_RESOURCES=OFF -DGLFW_COCOA_MENUBAR=ON -DGLFW_COCOA_RETINA_FRAMEBUFFER=ON
  55. $(MAKE) -C glfw
  56. $(MAKE) -C glfw install
  57. $(jansson):
  58. $(WGET) http://www.digip.org/jansson/releases/jansson-2.10.tar.gz
  59. $(UNTAR) jansson-2.10.tar.gz
  60. cd jansson-2.10 && $(CONFIGURE)
  61. $(MAKE) -C jansson-2.10
  62. $(MAKE) -C jansson-2.10 install
  63. $(libspeexdsp):
  64. $(WGET) https://vcvrack.com/downloads/dep/speexdsp-SpeexDSP-1.2rc3.tgz
  65. $(UNTAR) speexdsp-SpeexDSP-1.2rc3.tgz
  66. cd speexdsp-SpeexDSP-1.2rc3 && $(CONFIGURE)
  67. $(MAKE) -C speexdsp-SpeexDSP-1.2rc3
  68. $(MAKE) -C speexdsp-SpeexDSP-1.2rc3 install
  69. $(openssl):
  70. $(WGET) https://www.openssl.org/source/openssl-1.1.0g.tar.gz
  71. $(UNTAR) openssl-1.1.0g.tar.gz
  72. cd openssl-1.1.0g && ./config --prefix="$(realpath $(DEP_LOCAL))"
  73. $(MAKE) -C openssl-1.1.0g
  74. $(MAKE) -C openssl-1.1.0g install_sw
  75. $(libcurl): $(openssl)
  76. $(WGET) https://github.com/curl/curl/releases/download/curl-7_56_0/curl-7.56.0.tar.gz
  77. $(UNTAR) curl-7.56.0.tar.gz
  78. cd curl-7.56.0 && $(CONFIGURE) \
  79. --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 \
  80. --without-zlib --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 \
  81. --without-ca-bundle --with-ca-fallback --with-ssl="$(realpath $(DEP_LOCAL))"
  82. $(MAKE) -C curl-7.56.0
  83. $(MAKE) -C curl-7.56.0 install
  84. $(libzip):
  85. $(WGET) https://nih.at/libzip/libzip-1.2.0.tar.gz
  86. $(UNTAR) libzip-1.2.0.tar.gz
  87. cd libzip-1.2.0 && $(CONFIGURE)
  88. $(MAKE) -C libzip-1.2.0
  89. $(MAKE) -C libzip-1.2.0 install
  90. $(rtmidi):
  91. $(WGET) https://vcvrack.com/downloads/dep/rtmidi.tgz
  92. $(UNTAR) rtmidi.tgz
  93. cd rtmidi && $(CONFIGURE)
  94. $(MAKE) -C rtmidi
  95. $(MAKE) -C rtmidi install
  96. ifeq ($(ARCH),mac)
  97. RTAUDIO_FLAGS += -DAUDIO_OSX_CORE=ON
  98. endif
  99. ifeq ($(ARCH),win)
  100. RTAUDIO_FLAGS += -DAUDIO_WINDOWS_DS=ON -DAUDIO_WINDOWS_WASAPI=ON -DAUDIO_WINDOWS_ASIO=ON
  101. endif
  102. ifeq ($(ARCH),lin)
  103. RTAUDIO_FLAGS += -DAUDIO_LINUX_ALSA=ON
  104. endif
  105. ifdef RTAUDIO_ALL_APIS
  106. ifeq ($(ARCH),mac)
  107. RTAUDIO_FLAGS += -DAUDIO_UNIX_JACK=ON
  108. endif
  109. ifeq ($(ARCH),lin)
  110. RTAUDIO_FLAGS += -DAUDIO_LINUX_PULSE=ON -DAUDIO_UNIX_JACK=ON
  111. endif
  112. endif
  113. $(rtaudio):
  114. cd rtaudio && mkdir -p build
  115. cd rtaudio/build && $(CMAKE) $(RTAUDIO_FLAGS) ..
  116. $(MAKE) -C rtaudio/build
  117. $(MAKE) -C rtaudio/build install
  118. $(nanovg):
  119. cp nanovg/src/*.h include/
  120. $(nanosvg):
  121. cp nanosvg/src/*.h include/
  122. $(oui-blendish):
  123. cp oui-blendish/*.h include/
  124. $(osdialog):
  125. cp osdialog/*.h include/
  126. clean:
  127. git clean -ffdx