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.

485 lines
15KB

  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. ifneq ($(MACOS),true)
  13. PYUIC ?= pyuic4 -w
  14. PYRCC ?= pyrcc4 -py3
  15. else
  16. PYUIC ?= pyuic4-3.3 -w
  17. PYRCC ?= pyrcc4-3.3 -py3
  18. endif
  19. # --------------------------------------------------------------
  20. all: CXX RES UI WIDGETS
  21. # --------------------------------------------------------------
  22. # C++ code (native)
  23. ifeq ($(HAVE_JUCE),true)
  24. CXX: backend bridges discovery plugin plugin_ui theme
  25. else
  26. CXX: backend bridges discovery theme
  27. endif
  28. backend:
  29. $(MAKE) -C source/backend
  30. bridges:
  31. $(MAKE) -C source/bridges
  32. discovery:
  33. $(MAKE) -C source/discovery
  34. plugin:
  35. $(MAKE) -C source/plugin
  36. plugin_ui: source/carla-plugin source/*.py RES UI WIDGETS
  37. $(LINK) $(CURDIR)/source/carla-plugin source/modules/native-plugins/resources/
  38. $(LINK) $(CURDIR)/source/*.py source/modules/native-plugins/resources/
  39. theme:
  40. $(MAKE) -C source/modules/theme
  41. # --------------------------------------------------------------
  42. # C++ code (variants)
  43. posix32:
  44. $(MAKE) -C source/bridges posix32
  45. $(MAKE) -C source/discovery posix32
  46. posix64:
  47. $(MAKE) -C source/bridges posix64
  48. $(MAKE) -C source/discovery posix64
  49. win32:
  50. $(MAKE) -C source/bridges win32
  51. $(MAKE) -C source/discovery win32
  52. win64:
  53. $(MAKE) -C source/bridges win64
  54. $(MAKE) -C source/discovery win64
  55. wine32:
  56. $(MAKE) -C source/modules jackbridge-wine32
  57. $(LINK) ../modules/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll
  58. wine64:
  59. $(MAKE) -C source/modules jackbridge-wine64
  60. $(LINK) ../modules/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll
  61. # --------------------------------------------------------------
  62. # Resources
  63. RES = source/resources_rc.py
  64. RES: $(RES)
  65. source/%_rc.py: resources/%.qrc resources/*/*.png resources/*/*.svg
  66. $(PYRCC) $< -o $@
  67. # --------------------------------------------------------------
  68. # UI code
  69. UIs = \
  70. source/ui_carla_control.py \
  71. source/ui_carla_about.py \
  72. source/ui_carla_database.py \
  73. source/ui_carla_edit.py \
  74. source/ui_carla_host.py \
  75. source/ui_carla_parameter.py \
  76. source/ui_carla_plugin_basic_fx.py \
  77. source/ui_carla_plugin_default.py \
  78. source/ui_carla_plugin_calf.py \
  79. source/ui_carla_plugin_zita.py \
  80. source/ui_carla_plugin_zynfx.py \
  81. source/ui_carla_refresh.py \
  82. source/ui_carla_settings.py \
  83. source/ui_carla_settings_driver.py \
  84. source/ui_inputdialog_value.py
  85. UI: $(UIs)
  86. source/ui_%.py: resources/ui/%.ui
  87. $(PYUIC) $< -o $@
  88. # --------------------------------------------------------------
  89. # Widgets
  90. WIDGETS = \
  91. source/canvaspreviewframe.py \
  92. source/digitalpeakmeter.py \
  93. source/ledbutton.py \
  94. source/paramspinbox.py \
  95. source/pixmapbutton.py \
  96. source/pixmapdial.py \
  97. source/pixmapkeyboard.py
  98. WIDGETS: $(WIDGETS)
  99. source/%.py: source/widgets/%.py
  100. $(LINK) widgets/$*.py $@
  101. # --------------------------------------------------------------
  102. clean:
  103. $(MAKE) clean -C source/backend
  104. $(MAKE) clean -C source/bridges
  105. $(MAKE) clean -C source/discovery
  106. $(MAKE) clean -C source/modules
  107. $(MAKE) clean -C source/plugin
  108. rm -f $(RES)
  109. rm -f $(UIs)
  110. rm -f $(WIDGETS)
  111. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  112. # --------------------------------------------------------------
  113. debug:
  114. $(MAKE) DEBUG=true
  115. # --------------------------------------------------------------
  116. doxygen:
  117. $(MAKE) doxygen -C source/backend
  118. # --------------------------------------------------------------
  119. install:
  120. # Create directories
  121. install -d $(DESTDIR)$(PREFIX)/bin/
  122. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  123. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  124. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  125. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  126. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
  127. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/
  128. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/nekofilter/
  129. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/zynaddsubfx/
  130. install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig/
  131. install -d $(DESTDIR)$(PREFIX)/include/carla/
  132. install -d $(DESTDIR)$(PREFIX)/include/carla/includes/
  133. install -d $(DESTDIR)$(PREFIX)/share/applications/
  134. install -d $(DESTDIR)$(PREFIX)/share/carla/
  135. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  136. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  137. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  138. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  139. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  140. install -d $(DESTDIR)$(PREFIX)/share/mime/packages/
  141. # Install script files
  142. install -m 755 \
  143. data/carla \
  144. data/carla-database \
  145. data/carla-patchbay \
  146. data/carla-rack \
  147. data/carla-settings \
  148. $(DESTDIR)$(PREFIX)/bin/
  149. # data/carla-control \
  150. # data/carla-single \
  151. # Install desktop files
  152. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  153. # Install icons, 16x16
  154. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  155. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  156. # Install icons, 48x48
  157. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  158. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  159. # Install icons, 128x128
  160. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  161. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  162. # Install icons, 256x256
  163. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  164. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  165. # Install icons, scalable
  166. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  167. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  168. # Install mime package
  169. install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/
  170. # Install pkg-config file
  171. install -m 644 data/carla-standalone.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/
  172. # Install backend
  173. install -m 644 \
  174. source/backend/*.so \
  175. $(DESTDIR)$(PREFIX)/lib/carla/
  176. # Install binaries
  177. install -m 755 \
  178. source/bridges/*bridge-* \
  179. source/discovery/carla-discovery-* \
  180. $(DESTDIR)$(PREFIX)/lib/carla/
  181. # Install binaries for lv2 plugin
  182. install -m 755 \
  183. source/bridges/*bridge-* \
  184. source/discovery/carla-discovery-* \
  185. $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/
  186. # Install lv2 plugin
  187. install -m 644 \
  188. source/plugin/carla-native.lv2/*.so \
  189. source/plugin/carla-native.lv2/*.ttl \
  190. $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
  191. # Install python code
  192. install -m 644 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  193. # Install python "binaries"
  194. install -m 755 \
  195. source/carla \
  196. source/carla-patchbay \
  197. source/carla-plugin \
  198. source/carla-rack \
  199. $(DESTDIR)$(PREFIX)/share/carla/
  200. # Install headers
  201. install -m 644 source/backend/CarlaBackend.h $(DESTDIR)$(PREFIX)/include/carla/
  202. install -m 644 source/backend/CarlaHost.h $(DESTDIR)$(PREFIX)/include/carla/
  203. install -m 644 source/includes/CarlaDefines.h $(DESTDIR)$(PREFIX)/include/carla/includes/
  204. # Install resources (main)
  205. install -m 755 source/modules/native-plugins/resources/carla-plugin $(DESTDIR)$(PREFIX)/lib/carla/resources/
  206. install -m 755 source/modules/native-plugins/resources/*-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  207. install -m 644 source/modules/native-plugins/resources/*.py $(DESTDIR)$(PREFIX)/lib/carla/resources/
  208. install -m 644 source/modules/native-plugins/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  209. install -m 644 source/modules/native-plugins/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  210. # Install resources (lv2 plugin)
  211. install -m 755 source/modules/native-plugins/resources/carla-plugin $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/
  212. install -m 755 source/modules/native-plugins/resources/*-ui $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/
  213. install -m 644 source/modules/native-plugins/resources/*.py $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/
  214. install -m 644 source/modules/native-plugins/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/nekofilter/
  215. install -m 644 source/modules/native-plugins/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/zynaddsubfx/
  216. # Install theme
  217. $(MAKE) STYLES_DIR=$(DESTDIR)$(PREFIX)/lib/carla/styles install-main -C source/modules/theme
  218. $(MAKE) STYLES_DIR=$(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/resources/styles install-main -C source/modules/theme
  219. # Adjust PREFIX value in script files
  220. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  221. $(DESTDIR)$(PREFIX)/bin/carla \
  222. $(DESTDIR)$(PREFIX)/bin/carla-database \
  223. $(DESTDIR)$(PREFIX)/bin/carla-patchbay \
  224. $(DESTDIR)$(PREFIX)/bin/carla-rack \
  225. $(DESTDIR)$(PREFIX)/bin/carla-settings \
  226. $(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-standalone.pc
  227. # $(DESTDIR)$(PREFIX)/bin/carla-single \
  228. # $(DESTDIR)$(PREFIX)/bin/carla-control \
  229. # --------------------------------------------------------------
  230. uninstall:
  231. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  232. rm -f $(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-standalone.pc
  233. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  234. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  235. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  236. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  237. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  238. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  239. rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/carla.xml
  240. rm -rf $(DESTDIR)$(PREFIX)/include/carla/
  241. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  242. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
  243. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  244. # --------------------------------------------------------------
  245. ifneq ($(HAIKU),true)
  246. ANS_NO=\033[31m NO \033[0m
  247. ANS_YES=\033[32m YES \033[0m
  248. mS=\033[33m[
  249. mZ=\033[30;1m[
  250. mE=]\033[0m
  251. tS=\033[36m
  252. tE=\033[0m
  253. else
  254. ANS_NO=" NO "
  255. ANS_YES=" YES "
  256. endif
  257. features:
  258. @echo "$(tS)---> Engine driver $(tE)"
  259. @echo "JACK: $(ANS_YES)"
  260. ifeq ($(LINUX),true)
  261. ifeq ($(HAVE_ALSA),true)
  262. @echo "ALSA: $(ANS_YES)"
  263. else
  264. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  265. endif
  266. ifeq ($(HAVE_PULSEAUDIO),true)
  267. @echo "PulseAudio: $(ANS_YES)"
  268. else
  269. @echo "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  270. endif
  271. else
  272. @echo "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)"
  273. @echo "PulseAudio: $(ANS_NO) $(mZ)Linux only$(mE)"
  274. endif
  275. ifeq ($(MACOS),true)
  276. @echo "CoreAudio: $(ANS_YES)"
  277. else
  278. @echo "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)"
  279. endif
  280. ifeq ($(WIN32),true)
  281. @echo "ASIO: $(ANS_YES)"
  282. @echo "DirectSound:$(ANS_YES)"
  283. else
  284. @echo "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)"
  285. @echo "DirectSound:$(ANS_NO) $(mZ)Windows only$(mE)"
  286. endif
  287. @echo ""
  288. @echo "$(tS)---> Plugin formats: $(tE)"
  289. @echo "Internal:$(ANS_YES)"
  290. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  291. @echo "LADSPA: $(ANS_YES)"
  292. @echo "DSSI: $(ANS_YES)"
  293. @echo "LV2: $(ANS_YES)"
  294. @echo "VST: $(ANS_YES)"
  295. ifeq ($(MACOS),true)
  296. @echo "AU: $(ANS_YES)"
  297. else
  298. @echo "AU: $(ANS_NO) $(mZ)MacOS only$(mE)"
  299. endif
  300. else
  301. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  302. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  303. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  304. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  305. @echo "AU: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  306. endif
  307. @echo ""
  308. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  309. @echo "$(tS)---> LV2 UI toolkit support: $(tE)"
  310. @echo "External:$(ANS_YES) (direct+bridge)"
  311. ifeq ($(LINUX),true)
  312. ifeq ($(HAVE_GTK2),true)
  313. @echo "Gtk2: $(ANS_YES) (bridge)"
  314. else
  315. @echo "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  316. endif
  317. ifeq ($(HAVE_GTK3),true)
  318. @echo "Gtk3: $(ANS_YES) (bridge)"
  319. else
  320. @echo "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  321. endif
  322. ifeq ($(HAVE_QT4),true)
  323. @echo "Qt4: $(ANS_YES) (bridge)"
  324. else
  325. @echo "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  326. endif
  327. ifeq ($(HAVE_QT5),true)
  328. @echo "Qt5: $(ANS_YES) (bridge)"
  329. else
  330. @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  331. endif
  332. @echo "X11: $(ANS_YES) (direct+bridge)"
  333. else
  334. @echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
  335. @echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
  336. @echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
  337. @echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
  338. @echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
  339. endif
  340. ifeq ($(MACOS),true)
  341. @echo "Cocoa: $(ANS_YES) (direct+bridge)"
  342. else
  343. @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
  344. endif
  345. ifeq ($(WIN32),true)
  346. @echo "Windows: $(ANS_YES) (direct+bridge)"
  347. else
  348. @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
  349. endif
  350. @echo ""
  351. endif
  352. @echo "$(tS)---> File formats: $(tE)"
  353. ifeq ($(CARLA_CSOUND_SUPPORT),true)
  354. @echo "CSD:$(ANS_YES)"
  355. else
  356. @echo "CSD:$(ANS_NO) $(mS)CSound disabled$(mE)"
  357. endif
  358. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  359. ifeq ($(HAVE_LINUXSAMPLER),true)
  360. @echo "GIG:$(ANS_YES)"
  361. else
  362. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  363. endif
  364. ifeq ($(HAVE_FLUIDSYNTH),true)
  365. @echo "SF2:$(ANS_YES)"
  366. else
  367. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  368. endif
  369. ifeq ($(HAVE_LINUXSAMPLER),true)
  370. @echo "SFZ:$(ANS_YES)"
  371. else
  372. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  373. endif
  374. else
  375. @echo "GIG:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  376. @echo "SF2:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  377. @echo "SFZ:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  378. endif
  379. @echo ""
  380. @echo "$(tS)---> Internal plugins: $(tE)"
  381. ifeq ($(HAVE_AF_DEPS),true)
  382. ifeq ($(HAVE_FFMPEG),true)
  383. @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
  384. else
  385. @echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing or too new$(mE)"
  386. endif
  387. else
  388. @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
  389. endif
  390. ifeq ($(HAVE_MF_DEPS),true)
  391. @echo "MidiFile: $(ANS_YES)"
  392. else
  393. @echo "MidiFile: $(ANS_NO) $(mS)LibSMF missing$(mE)"
  394. endif
  395. ifeq ($(HAVE_OPENGL),true)
  396. @echo "DISTRHO: $(ANS_YES)"
  397. else
  398. @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"
  399. endif
  400. ifeq ($(HAVE_ZYN_DEPS),true)
  401. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  402. @echo "ZynAddSubFX:$(ANS_YES) (with UI)"
  403. else
  404. @echo "ZynAddSubFX:$(ANS_YES) (without UI) $(mS)NTK missing$(mE)"
  405. endif
  406. else
  407. @echo "ZynAddSubFX:$(ANS_NO) $(mS)fftw3, mxml or zlib missing$(mE)"
  408. endif
  409. # --------------------------------------------------------------