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