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.

180 lines
5.8KB

  1. RACK_DIR ?= ..
  2. .NOTPARALLEL:
  3. # Target paths
  4. include $(RACK_DIR)/arch.mk
  5. ifdef ARCH_LIN
  6. glew = lib/libGLEW.a
  7. glfw = lib/libglfw3.a
  8. jansson = lib/libjansson.a
  9. libspeexdsp = lib/libspeexdsp.a
  10. libcurl = lib/libcurl.a
  11. libzip = lib/libzip.a
  12. zlib = lib/libz.a
  13. rtmidi = lib/librtmidi.a
  14. rtaudio = lib/librtaudio.a
  15. openssl = lib/libssl.a
  16. endif
  17. ifdef ARCH_MAC
  18. glew = lib/libGLEW.a
  19. glfw = lib/libglfw3.a
  20. jansson = lib/libjansson.a
  21. libspeexdsp = lib/libspeexdsp.a
  22. libcurl = lib/libcurl.a
  23. libzip = lib/libzip.a
  24. zlib = lib/libz.a
  25. rtmidi = lib/librtmidi.a
  26. rtaudio = lib/librtaudio.a
  27. openssl = lib/libssl.a
  28. endif
  29. ifdef ARCH_WIN
  30. glew = lib/libglew32.a
  31. glfw = lib/libglfw3.a
  32. jansson = lib/libjansson.a
  33. libspeexdsp = lib/libspeexdsp.a
  34. libcurl = lib/libcurl.a
  35. libzip = lib/libzip.a
  36. zlib = lib/libz.a
  37. rtmidi = lib/librtmidi.a
  38. rtaudio = lib/librtaudio.a
  39. openssl = lib/libssl.a
  40. endif
  41. nanovg = include/nanovg.h
  42. nanosvg = include/nanosvg.h
  43. oui-blendish = include/blendish.h
  44. osdialog = include/osdialog.h
  45. pffft = include/pffft.h
  46. DEPS += $(glew) $(glfw) $(jansson) $(libspeexdsp) $(libcurl) $(libzip) $(rtmidi) $(rtaudio) $(nanovg) $(nanosvg) $(oui-blendish) $(osdialog) $(pffft)
  47. include $(RACK_DIR)/dep.mk
  48. # Targets
  49. $(glew):
  50. $(WGET) "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz"
  51. $(SHA256) glew-2.1.0.tgz 04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95
  52. $(UNTAR) glew-2.1.0.tgz
  53. cd glew-2.1.0 && mkdir -p build
  54. cd glew-2.1.0/build && $(CMAKE) ./cmake
  55. $(MAKE) -C glew-2.1.0/build
  56. $(MAKE) -C glew-2.1.0/build install
  57. $(glfw):
  58. cd glfw && mkdir -p build
  59. cd glfw/build && $(CMAKE) .. \
  60. -DGLFW_COCOA_CHDIR_RESOURCES=OFF -DGLFW_COCOA_MENUBAR=ON -DGLFW_COCOA_RETINA_FRAMEBUFFER=ON
  61. $(MAKE) -C glfw/build
  62. $(MAKE) -C glfw/build install
  63. $(jansson):
  64. $(WGET) "http://www.digip.org/jansson/releases/jansson-2.12.tar.gz"
  65. $(SHA256) jansson-2.12.tar.gz 5f8dec765048efac5d919aded51b26a32a05397ea207aa769ff6b53c7027d2c9
  66. $(UNTAR) jansson-2.12.tar.gz
  67. cd jansson-2.12 && $(CONFIGURE)
  68. $(MAKE) -C jansson-2.12
  69. $(MAKE) -C jansson-2.12 install
  70. $(libspeexdsp):
  71. $(WGET) "https://vcvrack.com/downloads/dep/speexdsp-SpeexDSP-1.2rc3.tgz"
  72. $(SHA256) speexdsp-SpeexDSP-1.2rc3.tgz c8dded1454747f65956f981c95e7f89a06abdaa2a53e8aeaa66bab2a3d59cebd
  73. $(UNTAR) speexdsp-SpeexDSP-1.2rc3.tgz
  74. cd speexdsp-SpeexDSP-1.2rc3 && $(CONFIGURE)
  75. $(MAKE) -C speexdsp-SpeexDSP-1.2rc3
  76. $(MAKE) -C speexdsp-SpeexDSP-1.2rc3 install
  77. $(openssl):
  78. $(WGET) "https://www.openssl.org/source/openssl-1.1.1a.tar.gz"
  79. $(SHA256) openssl-1.1.1a.tar.gz fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41
  80. $(UNTAR) openssl-1.1.1a.tar.gz
  81. @# ./config ignores CFLAGS, so hack it in with CC
  82. cd openssl-1.1.1a && CC="$(CC) $(CFLAGS)" ./config --prefix="$(realpath $(DEP_LOCAL))"
  83. $(MAKE) -C openssl-1.1.1a
  84. $(MAKE) -C openssl-1.1.1a install_sw
  85. $(libcurl): $(openssl)
  86. $(WGET) "https://curl.haxx.se/download/curl-7.63.0.tar.gz"
  87. $(SHA256) curl-7.63.0.tar.gz d483b89062832e211c887d7cf1b65c902d591b48c11fe7d174af781681580b41
  88. $(UNTAR) curl-7.63.0.tar.gz
  89. cd curl-7.63.0 && PKG_CONFIG_PATH= $(CONFIGURE) \
  90. --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 --disable-shared --disable-symbol-hiding \
  91. --without-zlib --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-brotli \
  92. --without-ca-bundle --with-ca-fallback --with-ssl=$(realpath $(DEP_LOCAL))
  93. $(MAKE) -C curl-7.63.0
  94. $(MAKE) -C curl-7.63.0 install
  95. $(libzip): $(zlib)
  96. $(WGET) "https://libzip.org/download/libzip-1.5.1.tar.xz"
  97. $(SHA256) libzip-1.5.1.tar.xz 04ea35b6956c7b3453f1ed3f3fe40e3ddae1f43931089124579e8384e79ed372
  98. $(UNTAR) libzip-1.5.1.tar.xz
  99. cd libzip-1.5.1 && mkdir -p build
  100. cd libzip-1.5.1/build && $(CMAKE) .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=ON -DCMAKE_FIND_ROOT_PATH="$(realpath $(DEP_LOCAL))"
  101. $(MAKE) -C libzip-1.5.1/build
  102. $(MAKE) -C libzip-1.5.1/build install
  103. $(zlib):
  104. $(WGET) "https://www.zlib.net/zlib-1.2.11.tar.gz"
  105. $(SHA256) zlib-1.2.11.tar.gz c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
  106. $(UNTAR) zlib-1.2.11.tar.gz
  107. ifdef ARCH_WIN
  108. $(MAKE) -C zlib-1.2.11 -f win32/Makefile.gcc
  109. $(MAKE) -C zlib-1.2.11 -f win32/Makefile.gcc BINARY_PATH="$(realpath $(DEP_LOCAL))/bin" INCLUDE_PATH="$(realpath $(DEP_LOCAL))/include" LIBRARY_PATH="$(realpath $(DEP_LOCAL))/lib" install
  110. else
  111. cd zlib-1.2.11 && $(CONFIGURE)
  112. $(MAKE) -C zlib-1.2.11
  113. $(MAKE) -C zlib-1.2.11 install
  114. endif
  115. $(rtmidi):
  116. $(WGET) "https://vcvrack.com/downloads/dep/rtmidi.tgz"
  117. $(SHA256) rtmidi.tgz b66ddc090eec2f3d05bdbe863760be9dce77cd525c3ca7c3a47cbabe035ebde1
  118. $(UNTAR) rtmidi.tgz
  119. cd rtmidi && $(CONFIGURE)
  120. $(MAKE) -C rtmidi
  121. $(MAKE) -C rtmidi install
  122. ifdef ARCH_MAC
  123. RTAUDIO_FLAGS += -DRTAUDIO_API_CORE=ON
  124. endif
  125. ifdef ARCH_WIN
  126. RTAUDIO_FLAGS += -DRTAUDIO_API_DS=ON -DRTAUDIO_API_WASAPI=ON -DRTAUDIO_API_ASIO=ON
  127. endif
  128. ifdef ARCH_LIN
  129. RTAUDIO_FLAGS += -DRTAUDIO_API_ALSA=ON -DRTAUDIO_API_JACK=ON -DRTAUDIO_API_PULSE=OFF
  130. endif
  131. $(rtaudio):
  132. cd rtaudio && mkdir -p build
  133. cd rtaudio/build && $(CMAKE) $(RTAUDIO_FLAGS) ..
  134. $(MAKE) -C rtaudio/build
  135. $(MAKE) -C rtaudio/build install
  136. cp lib/librtaudio_static.a lib/librtaudio.a
  137. $(nanovg): $(wildcard nanovg/src/*.h)
  138. cp $^ include/
  139. $(nanosvg): $(wildcard nanosvg/src/*.h)
  140. cp $^ include/
  141. $(oui-blendish): $(wildcard oui-blendish/*.h)
  142. cp $^ include/
  143. $(osdialog): $(wildcard osdialog/*.h)
  144. cp $^ include/
  145. $(pffft):
  146. $(WGET) "https://bitbucket.org/jpommier/pffft/get/29e4f76ac53b.zip"
  147. $(SHA256) 29e4f76ac53b.zip bb10afba127904a0c6c553fa445082729b7d72373511bda1b12a5be0e03f318a
  148. $(UNZIP) 29e4f76ac53b.zip
  149. cp jpommier-pffft-29e4f76ac53b/*.h include/
  150. clean:
  151. git clean -fdx
  152. git submodule foreach git clean -fdx