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.

420 lines
12KB

  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-wine32
  47. $(LINK) ../libs/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll
  48. wine64:
  49. $(MAKE) -C source/libs jackbridge-wine64
  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. doxygen:
  106. $(MAKE) doxygen -C source/backend
  107. # --------------------------------------------------------------
  108. install:
  109. # Create directories
  110. install -d $(DESTDIR)$(PREFIX)/bin/
  111. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  112. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  113. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  114. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  115. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  116. # install -d $(DESTDIR)$(PREFIX)/lib/dssi/
  117. # install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  118. # install -d $(DESTDIR)$(PREFIX)/lib/vst/
  119. # endif
  120. install -d $(DESTDIR)$(PREFIX)/share/applications/
  121. install -d $(DESTDIR)$(PREFIX)/share/carla/
  122. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  123. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  124. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  125. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  126. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  127. install -d $(DESTDIR)$(PREFIX)/share/mime/packages/
  128. # Install script files
  129. install -m 755 \
  130. data/carla \
  131. data/carla-control \
  132. data/carla-single \
  133. $(DESTDIR)$(PREFIX)/bin/
  134. # Install desktop files
  135. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  136. # Install icons, 16x16
  137. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  138. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  139. # Install icons, 48x48
  140. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  141. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  142. # Install icons, 128x128
  143. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  144. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  145. # Install icons, 256x256
  146. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  147. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  148. # Install icons, scalable
  149. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  150. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  151. # Install mime package
  152. install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/
  153. # Install binaries
  154. install -m 755 \
  155. source/backend/*.so \
  156. source/bridges/carla-bridge-* \
  157. source/discovery/carla-discovery-* \
  158. $(DESTDIR)$(PREFIX)/lib/carla/
  159. # Install python code
  160. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  161. # Install resources
  162. install -m 644 source/backend/resources/nekofilter-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  163. install -m 644 source/backend/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  164. install -m 644 source/backend/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  165. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  166. # # Install plugin
  167. # install -m 644 source/plugin/carla-dssi.so $(DESTDIR)$(PREFIX)/lib/dssi/
  168. # install -m 644 source/plugin/carla-vst.so $(DESTDIR)$(PREFIX)/lib/vst/
  169. # install -m 644 source/plugin/carla.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  170. # endif
  171. # Adjust PREFIX value in script files
  172. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  173. $(DESTDIR)$(PREFIX)/bin/carla \
  174. $(DESTDIR)$(PREFIX)/bin/carla-control \
  175. $(DESTDIR)$(PREFIX)/bin/carla-single
  176. # --------------------------------------------------------------
  177. uninstall:
  178. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  179. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  180. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  181. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  182. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  183. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  184. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  185. rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/carla.xml
  186. rm -f $(DESTDIR)$(PREFIX)/lib/dssi/carla-dssi.so
  187. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla-vst.so
  188. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  189. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  190. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  191. # --------------------------------------------------------------
  192. ANS_NO=\033[31m NO \033[0m
  193. ANS_YES=\033[32m YES \033[0m
  194. mS=\033[33m[
  195. mE=]\033[0m
  196. features:
  197. ifeq ($(MACOS),true)
  198. # --- MacOS ---
  199. @echo "\033[36m---> Engine drivers: (MacOS)\033[0m"
  200. @echo "JACK: $(ANS_YES)"
  201. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  202. @echo "CoreAudio:$(ANS_YES)"
  203. else
  204. @echo "CoreAudio:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  205. endif
  206. # --- MacOS ---
  207. else
  208. # --- Win32 ---
  209. ifeq ($(WIN32),true)
  210. @echo "\033[36m---> Engine drivers: (Windows)\033[0m"
  211. @echo "JACK: $(ANS_YES)"
  212. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  213. @echo "ASIO: $(ANS_YES)"
  214. @echo "DirectSound:$(ANS_YES)"
  215. else
  216. @echo "ASIO: $(ANS_NO) $(mS)RtAudio disabled$(mE)"
  217. @echo "DirectSound:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  218. endif
  219. # --- Win32 ---
  220. else
  221. # --- Others ---
  222. @echo "\033[36m---> Engine drivers: \033[0m"
  223. @echo "JACK: $(ANS_YES)"
  224. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  225. ifeq ($(HAVE_ALSA),true)
  226. @echo "ALSA: $(ANS_YES)"
  227. else
  228. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  229. endif
  230. ifeq ($(HAVE_PULSEAUDIO),true)
  231. @echo "PulseAudio:$(ANS_YES)"
  232. else
  233. @echo "PulseAudio:$(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  234. endif
  235. else
  236. @echo "ALSA: $(ANS_NO) $(mS)RtAudio disabled$(mE)"
  237. @echo "PulseAudio:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  238. endif
  239. # --- Others ---
  240. endif
  241. endif
  242. @echo ""
  243. @echo "\033[36m---> Plugin formats: \033[0m"
  244. @echo "Internal:$(ANS_YES)"
  245. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  246. @echo "LADSPA: $(ANS_YES)"
  247. @echo "DSSI: $(ANS_YES)"
  248. @echo "LV2: $(ANS_YES)"
  249. @echo "VST: $(ANS_YES)"
  250. else
  251. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  252. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  253. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  254. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  255. endif
  256. @echo ""
  257. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  258. @echo "\033[36m---> LV2 UI toolkit support: \033[0m"
  259. @echo "ExternalUI:$(ANS_YES) (direct)"
  260. ifeq ($(MACOS),true)
  261. # --- MacOS ---
  262. @echo "CocoaUI: $(ANS_YES) (direct+bridge)"
  263. # --- MacOS ---
  264. else
  265. # --- Win32 ---
  266. ifeq ($(WIN32),true)
  267. # --- Win32 ---
  268. @echo "WindowsUI: $(ANS_YES) (direct+bridge)"
  269. else
  270. # --- Others ---
  271. ifeq ($(HAVE_GTK2),true)
  272. @echo "GtkUI: $(ANS_YES) (bridge)"
  273. else
  274. @echo "GtkUI: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  275. endif
  276. ifeq ($(HAVE_GTK3),true)
  277. @echo "Gtk3UI: $(ANS_YES) (bridge)"
  278. else
  279. @echo "Gtk3UI: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  280. endif
  281. ifeq ($(HAVE_QT4),true)
  282. @echo "Qt4UI: $(ANS_YES) (direct+bridge)"
  283. else
  284. @echo "Qt4UI: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  285. endif
  286. ifeq ($(HAVE_QT5),true)
  287. ifeq ($(HAVE_QT4),true)
  288. @echo "Qt5UI: $(ANS_YES) (bridge)"
  289. else
  290. @echo "Qt5UI: $(ANS_YES) (direct+bridge)"
  291. endif
  292. else
  293. @echo "Qt5UI: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  294. endif
  295. @echo "X11UI: $(ANS_YES) (direct+bridge)"
  296. endif
  297. # --- Others ---
  298. endif
  299. @echo ""
  300. endif
  301. @echo "\033[36m---> Sample formats: \033[0m"
  302. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  303. ifeq ($(HAVE_LINUXSAMPLER),true)
  304. @echo "GIG:$(ANS_YES)"
  305. else
  306. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  307. endif
  308. ifeq ($(HAVE_FLUIDSYNTH),true)
  309. @echo "SF2:$(ANS_YES)"
  310. else
  311. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  312. endif
  313. ifeq ($(HAVE_LINUXSAMPLER),true)
  314. @echo "SFZ:$(ANS_YES)"
  315. else
  316. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  317. endif
  318. else
  319. @echo "GIG:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  320. @echo "SF2:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  321. @echo "SFZ:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  322. endif
  323. @echo ""
  324. @echo "\033[36m---> Internal plugins: \033[0m"
  325. ifeq ($(HAVE_AF_DEPS),true)
  326. ifeq ($(HAVE_FFMPEG),true)
  327. @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
  328. else
  329. @echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing$(mE)"
  330. endif
  331. else
  332. @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
  333. endif
  334. ifeq ($(HAVE_MF_DEPS),true)
  335. @echo "MidiFile: $(ANS_YES)"
  336. else
  337. @echo "MidiFile: $(ANS_NO) $(mS)libsmf missing$(mE)"
  338. endif
  339. ifeq ($(HAVE_OPENGL),true)
  340. @echo "DISTRHO: $(ANS_YES)"
  341. else
  342. @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"
  343. endif
  344. ifeq ($(HAVE_ZYN_DEPS),true)
  345. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  346. @echo "ZynAddSubFX:$(ANS_YES) (with UI)"
  347. else
  348. @echo "ZynAddSubFX:$(ANS_YES) (without UI) $(mS)NTK missing$(mE)"
  349. endif
  350. else
  351. @echo "ZynAddSubFX:$(ANS_NO) $(mS)fftw-3, mxml or zlib missing$(mE)"
  352. endif