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 (native)
  23. CXX: backend bridges discovery theme
  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. # --------------------------------------------------------------
  35. # C++ code (variants)
  36. posix32:
  37. $(MAKE) -C source/bridges posix32
  38. $(MAKE) -C source/discovery posix32
  39. posix64:
  40. $(MAKE) -C source/bridges posix64
  41. $(MAKE) -C source/discovery posix64
  42. win32:
  43. $(MAKE) -C source/bridges win32
  44. $(MAKE) -C source/discovery win32
  45. win64:
  46. $(MAKE) -C source/bridges win64
  47. $(MAKE) -C source/discovery win64
  48. wine32:
  49. $(MAKE) -C source/libs jackbridge-wine32
  50. $(LINK) ../libs/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll
  51. wine64:
  52. $(MAKE) -C source/libs jackbridge-wine64
  53. $(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll
  54. # --------------------------------------------------------------
  55. # Resources
  56. RES = source/resources_rc.py
  57. RES: $(RES)
  58. source/%_rc.py: resources/%.qrc resources/*/*.png resources/*/*.svg
  59. $(PYRCC) $< -o $@
  60. # --------------------------------------------------------------
  61. # UI code
  62. UIs = \
  63. source/ui_carla.py \
  64. source/ui_carla_control.py \
  65. source/ui_carla_about.py \
  66. source/ui_carla_database.py \
  67. source/ui_carla_edit.py \
  68. source/ui_carla_host.py \
  69. source/ui_carla_parameter.py \
  70. source/ui_carla_plugin.py \
  71. source/ui_carla_refresh.py \
  72. source/ui_carla_settings.py \
  73. source/ui_carla_settings_driver.py \
  74. source/ui_inputdialog_value.py
  75. UI: $(UIs)
  76. source/ui_%.py: resources/ui/%.ui
  77. $(PYUIC) $< -o $@
  78. # --------------------------------------------------------------
  79. # Widgets
  80. WIDGETS = \
  81. source/canvaspreviewframe.py \
  82. source/digitalpeakmeter.py \
  83. source/ledbutton.py \
  84. source/paramspinbox.py \
  85. source/pixmapbutton.py \
  86. source/pixmapdial.py \
  87. source/pixmapkeyboard.py
  88. WIDGETS: $(WIDGETS)
  89. source/%.py: source/widgets/%.py
  90. $(LINK) widgets/$*.py $@
  91. # --------------------------------------------------------------
  92. clean:
  93. $(MAKE) clean -C source/backend
  94. $(MAKE) clean -C source/bridges
  95. $(MAKE) clean -C source/discovery
  96. $(MAKE) clean -C source/modules
  97. $(MAKE) clean -C source/plugin
  98. rm -f $(RES)
  99. rm -f $(UIs)
  100. rm -f $(WIDGETS)
  101. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  102. # --------------------------------------------------------------
  103. debug:
  104. $(MAKE) DEBUG=true
  105. # --------------------------------------------------------------
  106. doxygen:
  107. $(MAKE) doxygen -C source/backend
  108. # --------------------------------------------------------------
  109. install:
  110. # Create directories
  111. install -d $(DESTDIR)$(PREFIX)/bin/
  112. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  113. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  114. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  115. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  116. install -d $(DESTDIR)$(PREFIX)/share/applications/
  117. install -d $(DESTDIR)$(PREFIX)/share/carla/
  118. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  119. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  120. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  121. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  122. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  123. install -d $(DESTDIR)$(PREFIX)/share/mime/packages/
  124. # Install script files
  125. install -m 755 \
  126. data/carla \
  127. data/carla-control \
  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 binaries
  150. install -m 755 \
  151. source/backend/*.so \
  152. source/bridges/carla-bridge-* \
  153. source/discovery/carla-discovery-* \
  154. $(DESTDIR)$(PREFIX)/lib/carla/
  155. # Install python code
  156. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  157. # Install resources
  158. install -m 644 source/backend/resources/nekofilter-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  159. install -m 644 source/backend/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  160. install -m 644 source/backend/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  161. # Adjust PREFIX value in script files
  162. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  163. $(DESTDIR)$(PREFIX)/bin/carla \
  164. $(DESTDIR)$(PREFIX)/bin/carla-control \
  165. $(DESTDIR)$(PREFIX)/bin/carla-single
  166. # --------------------------------------------------------------
  167. uninstall:
  168. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  169. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  170. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  171. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  172. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  173. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  174. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  175. rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/carla.xml
  176. rm -f $(DESTDIR)$(PREFIX)/lib/dssi/carla-dssi.so
  177. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla-vst.so
  178. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  179. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  180. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  181. # --------------------------------------------------------------
  182. ANS_NO=\033[31m NO \033[0m
  183. ANS_YES=\033[32m YES \033[0m
  184. mS=\033[33m[
  185. mZ=\033[30;1m[
  186. mE=]\033[0m
  187. features:
  188. @echo "\033[36m---> Engine drivers: \033[0m"
  189. @echo "JACK: $(ANS_YES)"
  190. ifeq ($(LINUX),true)
  191. ifeq ($(HAVE_ALSA),true)
  192. @echo "ALSA: $(ANS_YES)"
  193. else
  194. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  195. endif
  196. ifeq ($(HAVE_PULSEAUDIO),true)
  197. @echo "PulseAudio: $(ANS_YES)"
  198. else
  199. @echo "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  200. endif
  201. else
  202. @echo "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)"
  203. @echo "PulseAudio: $(ANS_NO) $(mZ)Linux only$(mE)"
  204. endif
  205. ifeq ($(MACOS),true)
  206. @echo "CoreAudio: $(ANS_YES)"
  207. else
  208. @echo "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)"
  209. endif
  210. ifeq ($(WIN32),true)
  211. @echo "ASIO: $(ANS_YES)"
  212. @echo "DirectSound:$(ANS_YES)"
  213. else
  214. @echo "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)"
  215. @echo "DirectSound:$(ANS_NO) $(mZ)Windows only$(mE)"
  216. endif
  217. @echo ""
  218. @echo "\033[36m---> Plugin formats: \033[0m"
  219. @echo "Internal:$(ANS_YES)"
  220. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  221. @echo "LADSPA: $(ANS_YES)"
  222. @echo "DSSI: $(ANS_YES)"
  223. @echo "LV2: $(ANS_YES)"
  224. @echo "VST: $(ANS_YES)"
  225. ifeq ($(MACOS),true)
  226. @echo "AU: $(ANS_YES)"
  227. else
  228. @echo "AU: $(ANS_NO) $(mZ)MacOS only$(mE)"
  229. endif
  230. else
  231. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  232. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  233. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  234. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  235. @echo "AU: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  236. endif
  237. @echo ""
  238. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  239. @echo "\033[36m---> LV2 UI toolkit support: \033[0m"
  240. @echo "External:$(ANS_YES) (direct+bridge)"
  241. ifeq ($(LINUX),true)
  242. ifeq ($(HAVE_GTK2),true)
  243. @echo "Gtk2: $(ANS_YES) (bridge)"
  244. else
  245. @echo "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  246. endif
  247. ifeq ($(HAVE_GTK3),true)
  248. @echo "Gtk3: $(ANS_YES) (bridge)"
  249. else
  250. @echo "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  251. endif
  252. ifeq ($(HAVE_QT4),true)
  253. @echo "Qt4: $(ANS_YES) (bridge)"
  254. else
  255. @echo "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  256. endif
  257. ifeq ($(HAVE_QT5),true)
  258. @echo "Qt5: $(ANS_YES) (bridge)"
  259. else
  260. @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  261. endif
  262. @echo "X11: $(ANS_YES) (direct+bridge)"
  263. else
  264. @echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
  265. @echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
  266. @echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
  267. @echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
  268. @echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
  269. endif
  270. ifeq ($(MACOS),true)
  271. @echo "Cocoa: $(ANS_YES) (direct+bridge)"
  272. else
  273. @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
  274. endif
  275. ifeq ($(WIN32),true)
  276. @echo "Windows: $(ANS_YES) (direct+bridge)"
  277. else
  278. @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
  279. endif
  280. @echo ""
  281. endif
  282. @echo "\033[36m---> File formats: \033[0m"
  283. ifeq ($(CARLA_CSOUND_SUPPORT),true)
  284. @echo "CSD:$(ANS_YES)"
  285. else
  286. @echo "CSD:$(ANS_NO) $(mS)CSound disabled$(mE)"
  287. endif
  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 or too new$(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)fftw3, mxml or zlib missing$(mE)"
  338. endif
  339. # --------------------------------------------------------------