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.

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