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.

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