Audio plugin host https://kx.studio/carla
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.

414 lines
11KB

  1. #!/usr/bin/make -f
  2. # Makefile for Carla #
  3. # ------------------ #
  4. # Created by falkTX
  5. #
  6. include source/Makefile.mk
  7. # --------------------------------------------------------------
  8. PREFIX = /usr/local
  9. DESTDIR =
  10. SED_PREFIX = $(shell echo $(PREFIX) | sed "s/\//\\\\\\\\\//g")
  11. LINK = ln -sf
  12. PYUIC ?= pyuic4
  13. PYRCC ?= pyrcc4 -py3
  14. # --------------------------------------------------------------
  15. all: CXX RES UI WIDGETS
  16. # --------------------------------------------------------------
  17. # C++ code
  18. CXX: backend bridges discovery
  19. backend:
  20. $(MAKE) -C source/backend
  21. bridges:
  22. $(MAKE) -C source/bridges
  23. discovery:
  24. $(MAKE) -C source/discovery
  25. plugin:
  26. $(MAKE) -C source/plugin
  27. tests:
  28. $(MAKE) -C source/tests
  29. theme:
  30. $(MAKE) -C source/theme
  31. widgets:
  32. $(MAKE) -C source/widgets
  33. posix32:
  34. $(MAKE) -C source/bridges posix32
  35. $(MAKE) -C source/discovery posix32
  36. posix64:
  37. $(MAKE) -C source/bridges posix64
  38. $(MAKE) -C source/discovery posix64
  39. win32:
  40. # $(MAKE) -C source/bridges win32
  41. $(MAKE) -C source/discovery win32
  42. win64:
  43. $(MAKE) -C source/bridges win64
  44. $(MAKE) -C source/discovery win64
  45. wine32:
  46. $(MAKE) -C source/libs jackbridge-win32.dll.so
  47. $(LINK) ../libs/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll
  48. wine64:
  49. $(MAKE) -C source/libs jackbridge-win64.dll.so
  50. $(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll
  51. # --------------------------------------------------------------
  52. # Resources
  53. RES = source/resources_rc.py
  54. RES: $(RES)
  55. source/%_rc.py: resources/%.qrc resources/*/*.png resources/*/*.svg
  56. $(PYRCC) $< -o $@
  57. # --------------------------------------------------------------
  58. # UI code
  59. UIs = \
  60. source/ui_carla.py \
  61. source/ui_carla_control.py \
  62. source/ui_carla_about.py \
  63. source/ui_carla_database.py \
  64. source/ui_carla_edit.py \
  65. source/ui_carla_parameter.py \
  66. source/ui_carla_plugin.py \
  67. source/ui_carla_refresh.py \
  68. source/ui_carla_settings.py \
  69. source/ui_carla_settings_driver.py \
  70. source/ui_inputdialog_value.py
  71. UI: $(UIs)
  72. source/ui_%.py: resources/ui/%.ui
  73. $(PYUIC) $< -o $@
  74. # --------------------------------------------------------------
  75. # Widgets
  76. WIDGETS = \
  77. source/canvaspreviewframe.py \
  78. source/digitalpeakmeter.py \
  79. source/ledbutton.py \
  80. source/paramspinbox.py \
  81. source/pixmapbutton.py \
  82. source/pixmapdial.py \
  83. source/pixmapkeyboard.py
  84. WIDGETS: $(WIDGETS)
  85. source/%.py: source/widgets/%.py
  86. $(LINK) widgets/$*.py $@
  87. # --------------------------------------------------------------
  88. clean:
  89. $(MAKE) clean -C source/backend
  90. $(MAKE) clean -C source/bridges
  91. $(MAKE) clean -C source/discovery
  92. $(MAKE) clean -C source/libs
  93. $(MAKE) clean -C source/plugin
  94. $(MAKE) clean -C source/tests
  95. $(MAKE) clean -C source/theme
  96. $(MAKE) clean -C source/widgets
  97. rm -f $(RES)
  98. rm -f $(UIs)
  99. rm -f $(WIDGETS)
  100. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  101. # --------------------------------------------------------------
  102. debug:
  103. $(MAKE) DEBUG=true
  104. # --------------------------------------------------------------
  105. install:
  106. # Create directories
  107. install -d $(DESTDIR)$(PREFIX)/bin/
  108. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  109. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  110. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  111. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  112. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  113. install -d $(DESTDIR)$(PREFIX)/lib/dssi/
  114. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  115. install -d $(DESTDIR)$(PREFIX)/lib/vst/
  116. endif
  117. install -d $(DESTDIR)$(PREFIX)/share/applications/
  118. install -d $(DESTDIR)$(PREFIX)/share/carla/
  119. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  120. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  121. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  122. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  123. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  124. install -d $(DESTDIR)$(PREFIX)/share/mime/packages/
  125. # Install script files
  126. install -m 755 \
  127. data/carla \
  128. data/carla-control \
  129. data/carla-single \
  130. $(DESTDIR)$(PREFIX)/bin/
  131. # Install desktop files
  132. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  133. # Install icons, 16x16
  134. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  135. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  136. # Install icons, 48x48
  137. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  138. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  139. # Install icons, 128x128
  140. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  141. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  142. # Install icons, 256x256
  143. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  144. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  145. # Install icons, scalable
  146. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  147. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  148. # Install mime package
  149. install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/
  150. # Install binaries
  151. install -m 755 \
  152. source/backend/*.so \
  153. source/bridges/carla-bridge-* \
  154. source/discovery/carla-discovery-* \
  155. $(DESTDIR)$(PREFIX)/lib/carla/
  156. # Install python code
  157. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  158. # Install resources
  159. install -m 644 source/backend/resources/nekofilter-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  160. install -m 644 source/backend/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  161. install -m 644 source/backend/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  162. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  163. # # Install plugin
  164. # install -m 644 source/plugin/carla-dssi.so $(DESTDIR)$(PREFIX)/lib/dssi/
  165. # install -m 644 source/plugin/carla-vst.so $(DESTDIR)$(PREFIX)/lib/vst/
  166. # install -m 644 source/plugin/carla.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  167. # endif
  168. # Adjust PREFIX value in script files
  169. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  170. $(DESTDIR)$(PREFIX)/bin/carla \
  171. $(DESTDIR)$(PREFIX)/bin/carla-control \
  172. $(DESTDIR)$(PREFIX)/bin/carla-single
  173. # --------------------------------------------------------------
  174. uninstall:
  175. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  176. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  177. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  178. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  179. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  180. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  181. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  182. rm -f $(DESTDIR)$(PREFIX)/lib/dssi/carla-dssi.so
  183. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla-vst.so
  184. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  185. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  186. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  187. # --------------------------------------------------------------
  188. ANS_NO=\033[31m NO \033[0m
  189. ANS_YES=\033[32m YES \033[0m
  190. mS=\033[33m[
  191. mE=]\033[0m
  192. features:
  193. ifeq ($(MACOS),true)
  194. # --- MacOS ---
  195. @echo "\033[36m---> Engine drivers: (MacOS)\033[0m"
  196. @echo "JACK: $(ANS_YES)"
  197. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  198. @echo "CoreAudio:$(ANS_YES)"
  199. else
  200. @echo "CoreAudio:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  201. endif
  202. # --- MacOS ---
  203. else
  204. # --- Win32 ---
  205. ifeq ($(WIN32),true)
  206. @echo "\033[36m---> Engine drivers: (Windows)\033[0m"
  207. @echo "JACK: $(ANS_YES)"
  208. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  209. @echo "ASIO: $(ANS_YES)"
  210. @echo "DirectSound:$(ANS_YES)"
  211. else
  212. @echo "ASIO: $(ANS_NO) $(mS)RtAudio disabled$(mE)"
  213. @echo "DirectSound:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  214. endif
  215. # --- Win32 ---
  216. else
  217. # --- Others ---
  218. @echo "\033[36m---> Engine drivers: \033[0m"
  219. @echo "JACK: $(ANS_YES)"
  220. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  221. ifeq ($(HAVE_ALSA),true)
  222. @echo "ALSA: $(ANS_YES)"
  223. else
  224. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  225. endif
  226. ifeq ($(HAVE_PULSEAUDIO),true)
  227. @echo "PulseAudio:$(ANS_YES)"
  228. else
  229. @echo "PulseAudio:$(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  230. endif
  231. else
  232. @echo "ALSA: $(ANS_NO) $(mS)RtAudio disabled$(mE)"
  233. @echo "PulseAudio:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  234. endif
  235. # --- Others ---
  236. endif
  237. endif
  238. @echo ""
  239. @echo "\033[36m---> Plugin formats: \033[0m"
  240. @echo "Internal:$(ANS_YES)"
  241. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  242. @echo "LADSPA: $(ANS_YES)"
  243. @echo "DSSI: $(ANS_YES)"
  244. @echo "LV2: $(ANS_YES)"
  245. @echo "VST: $(ANS_YES)"
  246. else
  247. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  248. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  249. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  250. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  251. endif
  252. @echo ""
  253. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  254. @echo "\033[36m---> LV2 UI toolkit support: \033[0m"
  255. @echo "ExternalUI:$(ANS_YES) (direct)"
  256. ifeq ($(MACOS),true)
  257. # --- MacOS ---
  258. @echo "CocoaUI: $(ANS_YES) (direct+bridge)"
  259. # --- MacOS ---
  260. else
  261. # --- Win32 ---
  262. ifeq ($(WIN32),true)
  263. # --- Win32 ---
  264. @echo "WindowsUI: $(ANS_YES) (direct+bridge)"
  265. else
  266. # --- Others ---
  267. ifeq ($(HAVE_GTK2),true)
  268. @echo "GtkUI: $(ANS_YES) (bridge)"
  269. else
  270. @echo "GtkUI: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  271. endif
  272. ifeq ($(HAVE_GTK3),true)
  273. @echo "Gtk3UI: $(ANS_YES) (bridge)"
  274. else
  275. @echo "Gtk3UI: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  276. endif
  277. ifeq ($(HAVE_QT4),true)
  278. @echo "Qt4UI: $(ANS_YES) (direct+bridge)"
  279. else
  280. @echo "Qt4UI: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  281. endif
  282. ifeq ($(HAVE_QT5),true)
  283. ifeq ($(HAVE_QT4),true)
  284. @echo "Qt5UI: $(ANS_YES) (bridge)"
  285. else
  286. @echo "Qt5UI: $(ANS_YES) (direct+bridge)"
  287. endif
  288. else
  289. @echo "Qt5UI: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  290. endif
  291. @echo "X11UI: $(ANS_YES) (direct+bridge)"
  292. endif
  293. # --- Others ---
  294. endif
  295. @echo ""
  296. endif
  297. @echo "\033[36m---> Sample formats: \033[0m"
  298. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  299. ifeq ($(HAVE_LINUXSAMPLER),true)
  300. @echo "GIG:$(ANS_YES)"
  301. else
  302. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  303. endif
  304. ifeq ($(HAVE_FLUIDSYNTH),true)
  305. @echo "SF2:$(ANS_YES)"
  306. else
  307. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  308. endif
  309. ifeq ($(HAVE_LINUXSAMPLER),true)
  310. @echo "SFZ:$(ANS_YES)"
  311. else
  312. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  313. endif
  314. else
  315. @echo "GIG:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  316. @echo "SF2:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  317. @echo "SFZ:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  318. endif
  319. @echo ""
  320. @echo "\033[36m---> Internal plugins: \033[0m"
  321. ifeq ($(HAVE_AF_DEPS),true)
  322. ifeq ($(HAVE_FFMPEG),true)
  323. @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
  324. else
  325. @echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing$(mE)"
  326. endif
  327. else
  328. @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
  329. endif
  330. ifeq ($(HAVE_MF_DEPS),true)
  331. @echo "MidiFile: $(ANS_YES)"
  332. else
  333. @echo "MidiFile: $(ANS_NO) $(mS)libsmf missing$(mE)"
  334. endif
  335. ifeq ($(HAVE_OPENGL),true)
  336. @echo "DISTRHO: $(ANS_YES)"
  337. else
  338. @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"
  339. endif
  340. ifeq ($(HAVE_ZYN_DEPS),true)
  341. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  342. @echo "ZynAddSubFX:$(ANS_YES) (with UI)"
  343. else
  344. @echo "ZynAddSubFX:$(ANS_YES) (without UI) $(mS)NTK missing$(mE)"
  345. endif
  346. else
  347. @echo "ZynAddSubFX:$(ANS_NO) $(mS)fftw-3, mxml or zlib missing$(mE)"
  348. endif