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.

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