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.

428 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 ?= pyuic5
  13. PYRCC ?= pyrcc5
  14. # --------------------------------------------------------------
  15. all: CXX RES UI WIDGETS
  16. # --------------------------------------------------------------
  17. # C++ code (native)
  18. CXX: backend bridges discovery plugin theme
  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/modules/theme
  29. # --------------------------------------------------------------
  30. # C++ code (variants)
  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_control.py \
  59. source/ui_carla_about.py \
  60. source/ui_carla_database.py \
  61. source/ui_carla_edit.py \
  62. source/ui_carla_host.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/modules
  91. $(MAKE) clean -C source/plugin
  92. rm -f $(RES)
  93. rm -f $(UIs)
  94. rm -f $(WIDGETS)
  95. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  96. # --------------------------------------------------------------
  97. debug:
  98. $(MAKE) DEBUG=true
  99. # --------------------------------------------------------------
  100. doxygen:
  101. $(MAKE) doxygen -C source/backend
  102. # --------------------------------------------------------------
  103. install:
  104. # Create directories
  105. install -d $(DESTDIR)$(PREFIX)/bin/
  106. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  107. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  108. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  109. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  110. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
  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-database \
  124. data/carla-patchbay \
  125. data/carla-rack \
  126. data/carla-settings \
  127. data/carla-single \
  128. $(DESTDIR)$(PREFIX)/bin/
  129. # Install desktop files
  130. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  131. # Install icons, 16x16
  132. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  133. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  134. # Install icons, 48x48
  135. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  136. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  137. # Install icons, 128x128
  138. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  139. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  140. # Install icons, 256x256
  141. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  142. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  143. # Install icons, scalable
  144. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  145. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  146. # Install mime package
  147. install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/
  148. # Install backend
  149. install -m 644 \
  150. source/backend/*.so \
  151. $(DESTDIR)$(PREFIX)/lib/carla/
  152. # Install binaries
  153. install -m 755 \
  154. source/bridges/carla-bridge-* \
  155. source/discovery/carla-discovery-* \
  156. $(DESTDIR)$(PREFIX)/lib/carla/
  157. # Install plugin
  158. install -m 644 \
  159. source/plugin/carla-native.lv2/*.so \
  160. source/plugin/carla-native.lv2/*.ttl \
  161. $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
  162. # Install python code
  163. install -m 644 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  164. # Install python "binaries"
  165. install -m 755 \
  166. source/carla \
  167. source/carla-patchbay \
  168. source/carla-rack \
  169. $(DESTDIR)$(PREFIX)/share/carla/
  170. # Install resources
  171. install -m 644 source/modules/carla_native/resources/*-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  172. install -m 644 source/modules/carla_native/resources/*.py $(DESTDIR)$(PREFIX)/lib/carla/resources/
  173. install -m 644 source/modules/carla_native/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  174. install -m 644 source/modules/carla_native/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  175. # Adjust PREFIX value in script files
  176. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  177. $(DESTDIR)$(PREFIX)/bin/carla \
  178. $(DESTDIR)$(PREFIX)/bin/carla-control \
  179. $(DESTDIR)$(PREFIX)/bin/carla-database \
  180. $(DESTDIR)$(PREFIX)/bin/carla-patchbay \
  181. $(DESTDIR)$(PREFIX)/bin/carla-rack \
  182. $(DESTDIR)$(PREFIX)/bin/carla-settings \
  183. $(DESTDIR)$(PREFIX)/bin/carla-single
  184. # Set plugin resources
  185. cd $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/ && \
  186. $(LINK) $(PREFIX)/lib/carla/resources/
  187. # --------------------------------------------------------------
  188. uninstall:
  189. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  190. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  191. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  192. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  193. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  194. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  195. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  196. rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/carla.xml
  197. rm -f $(DESTDIR)$(PREFIX)/lib/dssi/carla-dssi.so
  198. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla-vst.so
  199. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  200. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  201. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  202. # --------------------------------------------------------------
  203. ANS_NO=\033[31m NO \033[0m
  204. ANS_YES=\033[32m YES \033[0m
  205. mS=\033[33m[
  206. mZ=\033[30;1m[
  207. mE=]\033[0m
  208. features:
  209. @echo "\033[36m---> Engine drivers: \033[0m"
  210. @echo "JACK: $(ANS_YES)"
  211. ifeq ($(LINUX),true)
  212. ifeq ($(HAVE_ALSA),true)
  213. @echo "ALSA: $(ANS_YES)"
  214. else
  215. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  216. endif
  217. ifeq ($(HAVE_PULSEAUDIO),true)
  218. @echo "PulseAudio: $(ANS_YES)"
  219. else
  220. @echo "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  221. endif
  222. else
  223. @echo "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)"
  224. @echo "PulseAudio: $(ANS_NO) $(mZ)Linux only$(mE)"
  225. endif
  226. ifeq ($(MACOS),true)
  227. @echo "CoreAudio: $(ANS_YES)"
  228. else
  229. @echo "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)"
  230. endif
  231. ifeq ($(WIN32),true)
  232. @echo "ASIO: $(ANS_YES)"
  233. @echo "DirectSound:$(ANS_YES)"
  234. else
  235. @echo "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)"
  236. @echo "DirectSound:$(ANS_NO) $(mZ)Windows only$(mE)"
  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. ifeq ($(MACOS),true)
  247. @echo "AU: $(ANS_YES)"
  248. else
  249. @echo "AU: $(ANS_NO) $(mZ)MacOS only$(mE)"
  250. endif
  251. else
  252. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  253. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  254. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  255. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  256. @echo "AU: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  257. endif
  258. @echo ""
  259. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  260. @echo "\033[36m---> LV2 UI toolkit support: \033[0m"
  261. @echo "External:$(ANS_YES) (direct+bridge)"
  262. ifeq ($(LINUX),true)
  263. ifeq ($(HAVE_GTK2),true)
  264. @echo "Gtk2: $(ANS_YES) (bridge)"
  265. else
  266. @echo "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  267. endif
  268. ifeq ($(HAVE_GTK3),true)
  269. @echo "Gtk3: $(ANS_YES) (bridge)"
  270. else
  271. @echo "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  272. endif
  273. ifeq ($(HAVE_QT4),true)
  274. @echo "Qt4: $(ANS_YES) (bridge)"
  275. else
  276. @echo "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  277. endif
  278. ifeq ($(HAVE_QT5),true)
  279. @echo "Qt5: $(ANS_YES) (bridge)"
  280. else
  281. @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  282. endif
  283. @echo "X11: $(ANS_YES) (direct+bridge)"
  284. else
  285. @echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
  286. @echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
  287. @echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
  288. @echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
  289. @echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
  290. endif
  291. ifeq ($(MACOS),true)
  292. @echo "Cocoa: $(ANS_YES) (direct+bridge)"
  293. else
  294. @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
  295. endif
  296. ifeq ($(WIN32),true)
  297. @echo "Windows: $(ANS_YES) (direct+bridge)"
  298. else
  299. @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
  300. endif
  301. @echo ""
  302. endif
  303. @echo "\033[36m---> File formats: \033[0m"
  304. ifeq ($(CARLA_CSOUND_SUPPORT),true)
  305. @echo "CSD:$(ANS_YES)"
  306. else
  307. @echo "CSD:$(ANS_NO) $(mS)CSound disabled$(mE)"
  308. endif
  309. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  310. ifeq ($(HAVE_LINUXSAMPLER),true)
  311. @echo "GIG:$(ANS_YES)"
  312. else
  313. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  314. endif
  315. ifeq ($(HAVE_FLUIDSYNTH),true)
  316. @echo "SF2:$(ANS_YES)"
  317. else
  318. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  319. endif
  320. ifeq ($(HAVE_LINUXSAMPLER),true)
  321. @echo "SFZ:$(ANS_YES)"
  322. else
  323. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  324. endif
  325. else
  326. @echo "GIG:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  327. @echo "SF2:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  328. @echo "SFZ:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  329. endif
  330. @echo ""
  331. @echo "\033[36m---> Internal plugins: \033[0m"
  332. ifeq ($(HAVE_AF_DEPS),true)
  333. ifeq ($(HAVE_FFMPEG),true)
  334. @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
  335. else
  336. @echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing or too new$(mE)"
  337. endif
  338. else
  339. @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
  340. endif
  341. ifeq ($(HAVE_MF_DEPS),true)
  342. @echo "MidiFile: $(ANS_YES)"
  343. else
  344. @echo "MidiFile: $(ANS_NO) $(mS)LibSMF missing$(mE)"
  345. endif
  346. ifeq ($(HAVE_OPENGL),true)
  347. @echo "DISTRHO: $(ANS_YES)"
  348. else
  349. @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"
  350. endif
  351. ifeq ($(HAVE_ZYN_DEPS),true)
  352. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  353. @echo "ZynAddSubFX:$(ANS_YES) (with UI)"
  354. else
  355. @echo "ZynAddSubFX:$(ANS_YES) (without UI) $(mS)NTK missing$(mE)"
  356. endif
  357. else
  358. @echo "ZynAddSubFX:$(ANS_NO) $(mS)fftw3, mxml or zlib missing$(mE)"
  359. endif
  360. # --------------------------------------------------------------