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.

445 lines
13KB

  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 -w
  13. PYRCC ?= pyrcc4 -py3
  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_default.py \
  65. source/ui_carla_plugin_calf.py \
  66. source/ui_carla_plugin_zynfx.py \
  67. source/ui_carla_refresh.py \
  68. source/ui_carla_settings.py \
  69. source/ui_carla_settings_driver.py \
  70. source/ui_inputdialog_value.py
  71. UI: $(UIs)
  72. source/ui_%.py: resources/ui/%.ui
  73. $(PYUIC) $< -o $@
  74. # --------------------------------------------------------------
  75. # Widgets
  76. WIDGETS = \
  77. source/canvaspreviewframe.py \
  78. source/digitalpeakmeter.py \
  79. source/ledbutton.py \
  80. source/paramspinbox.py \
  81. source/pixmapbutton.py \
  82. source/pixmapdial.py \
  83. source/pixmapkeyboard.py
  84. WIDGETS: $(WIDGETS)
  85. source/%.py: source/widgets/%.py
  86. $(LINK) widgets/$*.py $@
  87. # --------------------------------------------------------------
  88. clean:
  89. $(MAKE) clean -C source/backend
  90. $(MAKE) clean -C source/bridges
  91. $(MAKE) clean -C source/discovery
  92. $(MAKE) clean -C source/modules
  93. $(MAKE) clean -C source/plugin
  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)/lib/lv2/carla-native.lv2/
  113. install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig/
  114. install -d $(DESTDIR)$(PREFIX)/include/carla/
  115. install -d $(DESTDIR)$(PREFIX)/include/carla/includes/
  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-database \
  129. data/carla-patchbay \
  130. data/carla-rack \
  131. data/carla-settings \
  132. data/carla-single \
  133. $(DESTDIR)$(PREFIX)/bin/
  134. # Install desktop files
  135. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  136. # Install icons, 16x16
  137. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  138. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  139. # Install icons, 48x48
  140. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  141. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  142. # Install icons, 128x128
  143. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  144. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  145. # Install icons, 256x256
  146. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  147. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  148. # Install icons, scalable
  149. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  150. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  151. # Install mime package
  152. install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/
  153. # Install pkgconfig file
  154. install -m 644 data/carla-standalone.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/
  155. # Install backend
  156. install -m 644 \
  157. source/backend/*.so \
  158. $(DESTDIR)$(PREFIX)/lib/carla/
  159. # Install binaries
  160. install -m 755 \
  161. source/bridges/carla-bridge-* \
  162. source/discovery/carla-discovery-* \
  163. $(DESTDIR)$(PREFIX)/lib/carla/
  164. # Install plugin
  165. install -m 644 \
  166. source/plugin/carla-native.lv2/*.so \
  167. source/plugin/carla-native.lv2/*.ttl \
  168. $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
  169. # Install python code
  170. install -m 644 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  171. # Install python "binaries"
  172. install -m 755 \
  173. source/carla \
  174. source/carla-patchbay \
  175. source/carla-rack \
  176. $(DESTDIR)$(PREFIX)/share/carla/
  177. # Install headers
  178. install -m 644 source/backend/CarlaBackend.h $(DESTDIR)$(PREFIX)/include/carla/
  179. install -m 644 source/backend/CarlaHost.h $(DESTDIR)$(PREFIX)/include/carla/
  180. install -m 644 source/includes/CarlaDefines.h $(DESTDIR)$(PREFIX)/include/carla/includes/
  181. # Install resources
  182. install -m 644 source/modules/carla_native/resources/*-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  183. install -m 644 source/modules/carla_native/resources/*.py $(DESTDIR)$(PREFIX)/lib/carla/resources/
  184. install -m 644 source/modules/carla_native/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  185. install -m 644 source/modules/carla_native/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  186. # Install theme
  187. $(MAKE) STYLES_DIR=$(DESTDIR)$(PREFIX)/lib/carla/styles install-main -C source/modules/theme
  188. # Adjust PREFIX value in script files
  189. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  190. $(DESTDIR)$(PREFIX)/bin/carla \
  191. $(DESTDIR)$(PREFIX)/bin/carla-control \
  192. $(DESTDIR)$(PREFIX)/bin/carla-database \
  193. $(DESTDIR)$(PREFIX)/bin/carla-patchbay \
  194. $(DESTDIR)$(PREFIX)/bin/carla-rack \
  195. $(DESTDIR)$(PREFIX)/bin/carla-settings \
  196. $(DESTDIR)$(PREFIX)/bin/carla-single \
  197. $(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-standalone.pc
  198. # Set plugin resources
  199. cd $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/ && \
  200. $(LINK) $(PREFIX)/lib/carla/resources/
  201. # --------------------------------------------------------------
  202. uninstall:
  203. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  204. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  205. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  206. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  207. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  208. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  209. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  210. rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/carla.xml
  211. rm -f $(DESTDIR)$(PREFIX)/lib/dssi/carla-dssi.so
  212. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla-vst.so
  213. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  214. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  215. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  216. # --------------------------------------------------------------
  217. ANS_NO=\033[31m NO \033[0m
  218. ANS_YES=\033[32m YES \033[0m
  219. mS=\033[33m[
  220. mZ=\033[30;1m[
  221. mE=]\033[0m
  222. features:
  223. @echo "\033[36m---> Engine drivers: \033[0m"
  224. @echo "JACK: $(ANS_YES)"
  225. ifeq ($(LINUX),true)
  226. ifeq ($(HAVE_ALSA),true)
  227. @echo "ALSA: $(ANS_YES)"
  228. else
  229. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  230. endif
  231. ifeq ($(HAVE_PULSEAUDIO),true)
  232. @echo "PulseAudio: $(ANS_YES)"
  233. else
  234. @echo "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  235. endif
  236. else
  237. @echo "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)"
  238. @echo "PulseAudio: $(ANS_NO) $(mZ)Linux only$(mE)"
  239. endif
  240. ifeq ($(MACOS),true)
  241. @echo "CoreAudio: $(ANS_YES)"
  242. else
  243. @echo "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)"
  244. endif
  245. ifeq ($(WIN32),true)
  246. @echo "ASIO: $(ANS_YES)"
  247. @echo "DirectSound:$(ANS_YES)"
  248. else
  249. @echo "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)"
  250. @echo "DirectSound:$(ANS_NO) $(mZ)Windows only$(mE)"
  251. endif
  252. @echo ""
  253. @echo "\033[36m---> Plugin formats: \033[0m"
  254. @echo "Internal:$(ANS_YES)"
  255. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  256. @echo "LADSPA: $(ANS_YES)"
  257. @echo "DSSI: $(ANS_YES)"
  258. @echo "LV2: $(ANS_YES)"
  259. @echo "VST: $(ANS_YES)"
  260. ifeq ($(MACOS),true)
  261. @echo "AU: $(ANS_YES)"
  262. else
  263. @echo "AU: $(ANS_NO) $(mZ)MacOS only$(mE)"
  264. endif
  265. else
  266. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  267. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  268. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  269. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  270. @echo "AU: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  271. endif
  272. @echo ""
  273. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  274. @echo "\033[36m---> LV2 UI toolkit support: \033[0m"
  275. @echo "External:$(ANS_YES) (direct+bridge)"
  276. ifeq ($(LINUX),true)
  277. ifeq ($(HAVE_GTK2),true)
  278. @echo "Gtk2: $(ANS_YES) (bridge)"
  279. else
  280. @echo "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  281. endif
  282. ifeq ($(HAVE_GTK3),true)
  283. @echo "Gtk3: $(ANS_YES) (bridge)"
  284. else
  285. @echo "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  286. endif
  287. ifeq ($(HAVE_QT4),true)
  288. @echo "Qt4: $(ANS_YES) (bridge)"
  289. else
  290. @echo "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  291. endif
  292. ifeq ($(HAVE_QT5),true)
  293. @echo "Qt5: $(ANS_YES) (bridge)"
  294. else
  295. @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  296. endif
  297. @echo "X11: $(ANS_YES) (direct+bridge)"
  298. else
  299. @echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
  300. @echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
  301. @echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
  302. @echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
  303. @echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
  304. endif
  305. ifeq ($(MACOS),true)
  306. @echo "Cocoa: $(ANS_YES) (direct+bridge)"
  307. else
  308. @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
  309. endif
  310. ifeq ($(WIN32),true)
  311. @echo "Windows: $(ANS_YES) (direct+bridge)"
  312. else
  313. @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
  314. endif
  315. @echo ""
  316. endif
  317. @echo "\033[36m---> File formats: \033[0m"
  318. ifeq ($(CARLA_CSOUND_SUPPORT),true)
  319. @echo "CSD:$(ANS_YES)"
  320. else
  321. @echo "CSD:$(ANS_NO) $(mS)CSound disabled$(mE)"
  322. endif
  323. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  324. ifeq ($(HAVE_LINUXSAMPLER),true)
  325. @echo "GIG:$(ANS_YES)"
  326. else
  327. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  328. endif
  329. ifeq ($(HAVE_FLUIDSYNTH),true)
  330. @echo "SF2:$(ANS_YES)"
  331. else
  332. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  333. endif
  334. ifeq ($(HAVE_LINUXSAMPLER),true)
  335. @echo "SFZ:$(ANS_YES)"
  336. else
  337. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  338. endif
  339. else
  340. @echo "GIG:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  341. @echo "SF2:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  342. @echo "SFZ:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  343. endif
  344. @echo ""
  345. @echo "\033[36m---> Internal plugins: \033[0m"
  346. ifeq ($(HAVE_AF_DEPS),true)
  347. ifeq ($(HAVE_FFMPEG),true)
  348. @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
  349. else
  350. @echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing or too new$(mE)"
  351. endif
  352. else
  353. @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
  354. endif
  355. ifeq ($(HAVE_MF_DEPS),true)
  356. @echo "MidiFile: $(ANS_YES)"
  357. else
  358. @echo "MidiFile: $(ANS_NO) $(mS)LibSMF missing$(mE)"
  359. endif
  360. ifeq ($(HAVE_OPENGL),true)
  361. @echo "DISTRHO: $(ANS_YES)"
  362. else
  363. @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"
  364. endif
  365. ifeq ($(HAVE_ZYN_DEPS),true)
  366. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  367. @echo "ZynAddSubFX:$(ANS_YES) (with UI)"
  368. else
  369. @echo "ZynAddSubFX:$(ANS_YES) (without UI) $(mS)NTK missing$(mE)"
  370. endif
  371. else
  372. @echo "ZynAddSubFX:$(ANS_NO) $(mS)fftw3, mxml or zlib missing$(mE)"
  373. endif
  374. # --------------------------------------------------------------