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.

226 lines
7.1KB

  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. DEP_LOCAL := .
  48. include $(RACK_DIR)/dep.mk
  49. # Targets
  50. glew-2.1.0:
  51. $(WGET) "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz"
  52. $(SHA256) glew-2.1.0.tgz 04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95
  53. $(UNTAR) glew-2.1.0.tgz
  54. rm glew-2.1.0.tgz
  55. $(glew): glew-2.1.0
  56. cd glew-2.1.0 && mkdir -p build
  57. cd glew-2.1.0/build && $(CMAKE) ./cmake
  58. $(MAKE) -C glew-2.1.0/build
  59. $(MAKE) -C glew-2.1.0/build install
  60. $(glfw): glfw
  61. cd glfw && mkdir -p build
  62. cd glfw/build && $(CMAKE) .. \
  63. -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF
  64. $(MAKE) -C glfw/build
  65. $(MAKE) -C glfw/build install
  66. jansson-2.12:
  67. $(WGET) "http://www.digip.org/jansson/releases/jansson-2.12.tar.gz"
  68. $(SHA256) jansson-2.12.tar.gz 5f8dec765048efac5d919aded51b26a32a05397ea207aa769ff6b53c7027d2c9
  69. $(UNTAR) jansson-2.12.tar.gz
  70. rm jansson-2.12.tar.gz
  71. $(jansson): jansson-2.12
  72. cd jansson-2.12 && $(CONFIGURE)
  73. $(MAKE) -C jansson-2.12
  74. $(MAKE) -C jansson-2.12 install
  75. speexdsp-SpeexDSP-1.2rc3:
  76. $(WGET) "https://vcvrack.com/downloads/dep/speexdsp-SpeexDSP-1.2rc3.tgz"
  77. $(SHA256) speexdsp-SpeexDSP-1.2rc3.tgz c8dded1454747f65956f981c95e7f89a06abdaa2a53e8aeaa66bab2a3d59cebd
  78. $(UNTAR) speexdsp-SpeexDSP-1.2rc3.tgz
  79. rm speexdsp-SpeexDSP-1.2rc3.tgz
  80. $(libspeexdsp): speexdsp-SpeexDSP-1.2rc3
  81. cd speexdsp-SpeexDSP-1.2rc3 && $(CONFIGURE)
  82. $(MAKE) -C speexdsp-SpeexDSP-1.2rc3
  83. $(MAKE) -C speexdsp-SpeexDSP-1.2rc3 install
  84. openssl-1.1.1b:
  85. $(WGET) "https://www.openssl.org/source/openssl-1.1.1b.tar.gz"
  86. $(SHA256) openssl-1.1.1b.tar.gz 5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b
  87. $(UNTAR) openssl-1.1.1b.tar.gz
  88. rm openssl-1.1.1b.tar.gz
  89. $(openssl): openssl-1.1.1b
  90. @# ./config ignores CFLAGS, so hack it in with CC
  91. cd openssl-1.1.1b && CC="$(CC) $(CFLAGS)" ./config --prefix="$(DEP_PATH)"
  92. $(MAKE) -C openssl-1.1.1b
  93. $(MAKE) -C openssl-1.1.1b install_sw
  94. curl-7.64.1:
  95. $(WGET) "https://curl.haxx.se/download/curl-7.64.1.tar.gz"
  96. $(SHA256) curl-7.64.1.tar.gz 432d3f466644b9416bc5b649d344116a753aeaa520c8beaf024a90cba9d3d35d
  97. $(UNTAR) curl-7.64.1.tar.gz
  98. rm curl-7.64.1.tar.gz
  99. $(libcurl): $(openssl) curl-7.64.1
  100. cd curl-7.64.1 && PKG_CONFIG_PATH= $(CONFIGURE) \
  101. --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 \
  102. --without-zlib --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-brotli \
  103. --without-ca-bundle --with-ca-fallback --with-ssl="$(DEP_PATH)"
  104. $(MAKE) -C curl-7.64.1
  105. $(MAKE) -C curl-7.64.1 install
  106. libzip-1.5.2:
  107. $(WGET) "https://libzip.org/download/libzip-1.5.2.tar.gz"
  108. $(SHA256) libzip-1.5.2.tar.gz be694a4abb2ffe5ec02074146757c8b56084dbcebf329123c84b205417435e15
  109. $(UNTAR) libzip-1.5.2.tar.gz
  110. rm libzip-1.5.2.tar.gz
  111. $(libzip): $(zlib) libzip-1.5.2
  112. cd libzip-1.5.2 && mkdir -p build
  113. cd libzip-1.5.2/build && $(CMAKE) .. -DCMAKE_FIND_ROOT_PATH="$(DEP_PATH)" -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DENABLE_BZIP2=OFF -DBUILD_TOOLS=OFF -DBUILD_REGRESS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DBUILD_SHARED_LIBS=OFF
  114. $(MAKE) -C libzip-1.5.2/build
  115. $(MAKE) -C libzip-1.5.2/build install
  116. zlib-1.2.11:
  117. $(WGET) "https://www.zlib.net/zlib-1.2.11.tar.gz"
  118. $(SHA256) zlib-1.2.11.tar.gz c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
  119. $(UNTAR) zlib-1.2.11.tar.gz
  120. rm zlib-1.2.11.tar.gz
  121. $(zlib): zlib-1.2.11
  122. ifdef ARCH_WIN
  123. $(MAKE) -C zlib-1.2.11 -f win32/Makefile.gcc
  124. $(MAKE) -C zlib-1.2.11 -f win32/Makefile.gcc BINARY_PATH="$(DEP_PATH)/bin" INCLUDE_PATH="$(DEP_PATH)/include" LIBRARY_PATH="$(DEP_PATH)/lib" install
  125. else
  126. # Don't use $(CONFIGURE) because this is a handwritten configure script
  127. cd zlib-1.2.11 && ./configure --prefix="$(DEP_PATH)"
  128. $(MAKE) -C zlib-1.2.11
  129. $(MAKE) -C zlib-1.2.11 install
  130. endif
  131. rtmidi-4.0.0:
  132. $(WGET) "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz"
  133. $(SHA256) rtmidi-4.0.0.tar.gz 370cfe710f43fbeba8d2b8c8bc310f314338c519c2cf2865e2d2737b251526cd
  134. $(UNTAR) rtmidi-4.0.0.tar.gz
  135. rm rtmidi-4.0.0.tar.gz
  136. RTMIDI_FLAGS += --enable-shared=no
  137. ifdef ARCH_MAC
  138. RTMIDI_FLAGS += --with-core --without-jack
  139. endif
  140. ifdef ARCH_WIN
  141. RTMIDI_FLAGS += --with-winmm
  142. endif
  143. ifdef ARCH_LIN
  144. RTMIDI_FLAGS += --with-jack --with-alsa
  145. endif
  146. $(rtmidi): rtmidi-4.0.0
  147. cd rtmidi-4.0.0 && $(CONFIGURE) $(RTMIDI_FLAGS)
  148. $(MAKE) -C rtmidi-4.0.0
  149. $(MAKE) -C rtmidi-4.0.0 install
  150. RTAUDIO_FLAGS += -DRTAUDIO_BUILD_STATIC_LIBS=ON
  151. ifdef ARCH_MAC
  152. RTAUDIO_FLAGS += -DRTAUDIO_API_CORE=ON -DRTAUDIO_API_PULSE=OFF -DRTAUDIO_API_JACK=OFF
  153. endif
  154. ifdef ARCH_WIN
  155. RTAUDIO_FLAGS += -DRTAUDIO_API_DS=ON -DRTAUDIO_API_WASAPI=ON -DRTAUDIO_API_ASIO=ON
  156. endif
  157. ifdef ARCH_LIN
  158. RTAUDIO_FLAGS += -DRTAUDIO_API_ALSA=ON -DRTAUDIO_API_JACK=ON -DRTAUDIO_API_PULSE=OFF -DRTAUDIO_API_OSS=OFF
  159. endif
  160. $(rtaudio): rtaudio
  161. cd rtaudio && mkdir -p build
  162. cd rtaudio/build && $(CMAKE) $(RTAUDIO_FLAGS) ..
  163. $(MAKE) -C rtaudio/build
  164. $(MAKE) -C rtaudio/build install
  165. $(nanovg): $(wildcard nanovg/src/*.h) nanovg/example/stb_image_write.h
  166. cp $^ include/
  167. $(nanosvg): $(wildcard nanosvg/src/*.h)
  168. cp $^ include/
  169. $(oui-blendish): $(wildcard oui-blendish/*.h)
  170. cp $^ include/
  171. $(osdialog): $(wildcard osdialog/*.h)
  172. cp $^ include/
  173. jpommier-pffft-29e4f76ac53b:
  174. $(WGET) "https://bitbucket.org/jpommier/pffft/get/29e4f76ac53b.zip"
  175. $(SHA256) 29e4f76ac53b.zip bb10afba127904a0c6c553fa445082729b7d72373511bda1b12a5be0e03f318a
  176. $(UNZIP) 29e4f76ac53b.zip
  177. rm 29e4f76ac53b.zip
  178. $(pffft): jpommier-pffft-29e4f76ac53b
  179. cp jpommier-pffft-29e4f76ac53b/*.h include/
  180. # Helpers
  181. src: glew-2.1.0 glfw jansson-2.12 speexdsp-SpeexDSP-1.2rc3 openssl-1.1.1b curl-7.64.1 libzip-1.5.2 zlib-1.2.11 rtmidi-4.0.0 rtaudio nanovg nanosvg oui-blendish osdialog jpommier-pffft-29e4f76ac53b
  182. clean:
  183. git clean -fdx
  184. git submodule foreach git clean -fdx