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.

940 lines
29KB

  1. #!/usr/bin/make -f
  2. # Makefile for Carla #
  3. # ------------------ #
  4. # Created by falkTX
  5. #
  6. CWD=source
  7. include source/Makefile.mk
  8. # ----------------------------------------------------------------------------------------------------------------------------
  9. LINK := ln -sf
  10. ifeq ($(DEFAULT_QT),4)
  11. PYUIC ?= pyuic4 -w
  12. PYRCC ?= pyrcc4 -py3
  13. ifeq ($(HAVE_QT4),true)
  14. HAVE_THEME = true
  15. endif
  16. else
  17. PYUIC ?= pyuic5
  18. PYRCC ?= pyrcc5
  19. ifeq ($(HAVE_QT5),true)
  20. HAVE_THEME = true
  21. endif
  22. endif
  23. # ----------------------------------------------------------------------------------------------------------------------------
  24. PREFIX := /usr/local
  25. BINDIR := $(PREFIX)/bin
  26. LIBDIR := $(PREFIX)/lib
  27. DATADIR := $(PREFIX)/share
  28. INCLUDEDIR := $(PREFIX)/include
  29. DESTDIR :=
  30. ifeq ($(DEBUG),true)
  31. MODULEDIR := $(CURDIR)/build/modules/Debug
  32. else
  33. MODULEDIR := $(CURDIR)/build/modules/Release
  34. endif
  35. # ----------------------------------------------------------------------------------------------------------------------------
  36. all: BIN RES UI WIDGETS
  37. # ----------------------------------------------------------------------------------------------------------------------------
  38. # Binaries (native)
  39. BIN: backend discovery bridges-plugin bridges-ui interposer libjack plugin theme
  40. # ----------------------------------------------------------------------------------------------------------------------------
  41. ALL_LIBS += $(MODULEDIR)/carla_engine.a
  42. ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a
  43. ALL_LIBS += $(MODULEDIR)/carla_plugin.a
  44. ALL_LIBS += $(MODULEDIR)/jackbridge.a
  45. ALL_LIBS += $(MODULEDIR)/native-plugins.a
  46. ALL_LIBS += $(MODULEDIR)/lilv.a
  47. ALL_LIBS += $(MODULEDIR)/rtmempool.a
  48. ALL_LIBS += $(MODULEDIR)/water.a
  49. ifeq ($(HAVE_HYLIA),true)
  50. ALL_LIBS += $(MODULEDIR)/hylia.a
  51. endif
  52. ALL_LIBS += $(MODULEDIR)/rtaudio.a
  53. ALL_LIBS += $(MODULEDIR)/rtmidi.a
  54. ifeq ($(HAVE_QT4),true)
  55. ALL_LIBS += $(MODULEDIR)/theme.qt4.a
  56. endif
  57. ifeq ($(HAVE_QT5),true)
  58. ALL_LIBS += $(MODULEDIR)/theme.qt5.a
  59. endif
  60. libs: $(ALL_LIBS)
  61. $(MODULEDIR)/carla_engine.a: .FORCE
  62. @$(MAKE) -C source/backend/engine
  63. $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a
  64. @$(MAKE) -C source/backend/engine
  65. $(MODULEDIR)/carla_plugin.a: .FORCE
  66. @$(MAKE) -C source/backend/plugin
  67. $(MODULEDIR)/jackbridge.a: .FORCE
  68. @$(MAKE) -C source/jackbridge
  69. $(MODULEDIR)/jackbridge.%.a: .FORCE
  70. @$(MAKE) -C source/jackbridge $*
  71. $(MODULEDIR)/native-plugins.a: .FORCE
  72. @$(MAKE) -C source/native-plugins
  73. $(MODULEDIR)/theme.qt4.a: .FORCE
  74. @$(MAKE) -C source/theme qt4
  75. $(MODULEDIR)/theme.qt5.a: .FORCE
  76. @$(MAKE) -C source/theme qt5
  77. $(MODULEDIR)/%.posix32.a: .FORCE
  78. @$(MAKE) -C source/modules/$* posix32
  79. $(MODULEDIR)/%.posix64.a: .FORCE
  80. @$(MAKE) -C source/modules/$* posix64
  81. $(MODULEDIR)/%.win32.a: .FORCE
  82. @$(MAKE) -C source/modules/$* win32
  83. $(MODULEDIR)/%.win64.a: .FORCE
  84. @$(MAKE) -C source/modules/$* win64
  85. $(MODULEDIR)/%.a: .FORCE
  86. @$(MAKE) -C source/modules/$*
  87. # ----------------------------------------------------------------------------------------------------------------------------
  88. backend: libs
  89. @$(MAKE) -C source/backend
  90. bridges-plugin: libs
  91. @$(MAKE) -C source/bridges-plugin
  92. bridges-ui: libs
  93. @$(MAKE) -C source/bridges-ui
  94. discovery: libs
  95. @$(MAKE) -C source/discovery
  96. interposer:
  97. @$(MAKE) -C source/interposer
  98. libjack: libs
  99. @$(MAKE) -C source/libjack
  100. plugin: backend bridges-plugin bridges-ui discovery
  101. @$(MAKE) -C source/plugin
  102. theme: libs
  103. @$(MAKE) -C source/theme
  104. # ----------------------------------------------------------------------------------------------------------------------------
  105. # Binaries (posix32)
  106. LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
  107. LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
  108. LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
  109. LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
  110. posix32: $(LIBS_POSIX32)
  111. $(MAKE) -C source/bridges-plugin posix32
  112. $(MAKE) -C source/discovery posix32
  113. # ----------------------------------------------------------------------------------------------------------------------------
  114. # Binaries (posix64)
  115. LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
  116. LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
  117. LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
  118. LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
  119. posix64: $(LIBS_POSIX64)
  120. $(MAKE) -C source/bridges-plugin posix64
  121. $(MAKE) -C source/discovery posix64
  122. # ----------------------------------------------------------------------------------------------------------------------------
  123. # Binaries (win32)
  124. ifeq ($(BUILDING_FOR_WINDOWS),true)
  125. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32.a
  126. else
  127. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32e.a
  128. endif
  129. LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
  130. LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
  131. LIBS_WIN32 += $(MODULEDIR)/water.win32.a
  132. win32: $(LIBS_WIN32)
  133. $(MAKE) -C source/bridges-plugin win32
  134. $(MAKE) -C source/discovery win32
  135. # ----------------------------------------------------------------------------------------------------------------------------
  136. # Binaries (win64)
  137. ifeq ($(BUILDING_FOR_WINDOWS),true)
  138. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64.a
  139. else
  140. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64e.a
  141. endif
  142. LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
  143. LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
  144. LIBS_WIN64 += $(MODULEDIR)/water.win64.a
  145. win64: $(LIBS_WIN64)
  146. $(MAKE) -C source/bridges-plugin win64
  147. $(MAKE) -C source/discovery win64
  148. # ----------------------------------------------------------------------------------------------------------------------------
  149. # Binaries (wine)
  150. wine32:
  151. $(MAKE) -C source/jackbridge wine32
  152. cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(CURDIR)/bin/jackbridge-wine32.dll
  153. wine64:
  154. $(MAKE) -C source/jackbridge wine64
  155. cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll
  156. # ----------------------------------------------------------------------------------------------------------------------------
  157. # Resources
  158. ifeq ($(HAVE_PYQT),true)
  159. RES = \
  160. bin/resources/carla_app.py \
  161. bin/resources/carla_backend.py \
  162. bin/resources/carla_backend_qt.py \
  163. bin/resources/carla_config.py \
  164. bin/resources/carla_control.py \
  165. bin/resources/carla_database.py \
  166. bin/resources/carla_host.py \
  167. bin/resources/carla_settings.py \
  168. bin/resources/carla_skin.py \
  169. bin/resources/carla_shared.py \
  170. bin/resources/carla_utils.py \
  171. bin/resources/carla_widgets.py \
  172. bin/resources/canvaspreviewframe.py \
  173. bin/resources/digitalpeakmeter.py \
  174. bin/resources/draggablegraphicsview.py \
  175. bin/resources/externalui.py \
  176. bin/resources/ledbutton.py \
  177. bin/resources/paramspinbox.py \
  178. bin/resources/patchcanvas.py \
  179. bin/resources/patchcanvas_theme.py \
  180. bin/resources/pianoroll.py \
  181. bin/resources/pixmapbutton.py \
  182. bin/resources/pixmapdial.py \
  183. bin/resources/pixmapkeyboard.py \
  184. bin/resources/racklistwidget.py \
  185. bin/resources/resources_rc.py \
  186. bin/resources/ui_carla_about.py \
  187. bin/resources/ui_carla_add_jack.py \
  188. bin/resources/ui_carla_database.py \
  189. bin/resources/ui_carla_edit.py \
  190. bin/resources/ui_carla_host.py \
  191. bin/resources/ui_carla_parameter.py \
  192. bin/resources/ui_carla_plugin_calf.py \
  193. bin/resources/ui_carla_plugin_classic.py \
  194. bin/resources/ui_carla_plugin_compact.py \
  195. bin/resources/ui_carla_plugin_default.py \
  196. bin/resources/ui_carla_plugin_presets.py \
  197. bin/resources/ui_carla_refresh.py \
  198. bin/resources/ui_carla_settings.py \
  199. bin/resources/ui_carla_settings_driver.py \
  200. bin/resources/ui_inputdialog_value.py \
  201. bin/resources/ui_midipattern.py \
  202. source/carla_config.py \
  203. source/resources_rc.py
  204. RES: $(RES)
  205. source/carla_config.py:
  206. @echo "#!/usr/bin/env python3" > $@
  207. @echo "# -*- coding: utf-8 -*-" >> $@
  208. ifeq ($(DEFAULT_QT),4)
  209. @echo "config_UseQt5 = False" >> $@
  210. else
  211. @echo "config_UseQt5 = True" >> $@
  212. endif
  213. source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg
  214. $(PYRCC) $< -o $@
  215. bin/resources/%.py: source/%.py
  216. $(LINK) $(CURDIR)/source/$*.py bin/resources/
  217. else
  218. RES:
  219. endif
  220. # ----------------------------------------------------------------------------------------------------------------------------
  221. # UI code
  222. ifeq ($(HAVE_PYQT),true)
  223. UIs = \
  224. source/ui_carla_about.py \
  225. source/ui_carla_add_jack.py \
  226. source/ui_carla_database.py \
  227. source/ui_carla_edit.py \
  228. source/ui_carla_host.py \
  229. source/ui_carla_parameter.py \
  230. source/ui_carla_plugin_calf.py \
  231. source/ui_carla_plugin_classic.py \
  232. source/ui_carla_plugin_compact.py \
  233. source/ui_carla_plugin_default.py \
  234. source/ui_carla_plugin_presets.py \
  235. source/ui_carla_refresh.py \
  236. source/ui_carla_settings.py \
  237. source/ui_carla_settings_driver.py \
  238. source/ui_inputdialog_value.py \
  239. source/ui_midipattern.py
  240. UI: $(UIs)
  241. source/ui_%.py: resources/ui/%.ui
  242. $(PYUIC) $< -o $@
  243. else
  244. UI:
  245. endif
  246. # ----------------------------------------------------------------------------------------------------------------------------
  247. # Widgets
  248. WIDGETS = \
  249. source/canvaspreviewframe.py \
  250. source/digitalpeakmeter.py \
  251. source/draggablegraphicsview.py \
  252. source/ledbutton.py \
  253. source/paramspinbox.py \
  254. source/pianoroll.py \
  255. source/pixmapbutton.py \
  256. source/pixmapdial.py \
  257. source/pixmapkeyboard.py \
  258. source/racklistwidget.py
  259. WIDGETS: $(WIDGETS)
  260. source/%.py: source/widgets/%.py
  261. $(LINK) widgets/$*.py $@
  262. # ----------------------------------------------------------------------------------------------------------------------------
  263. clean:
  264. $(MAKE) clean -C source/backend
  265. $(MAKE) clean -C source/bridges-plugin
  266. $(MAKE) clean -C source/bridges-ui
  267. $(MAKE) clean -C source/discovery
  268. $(MAKE) clean -C source/interposer
  269. $(MAKE) clean -C source/libjack
  270. $(MAKE) clean -C source/modules
  271. $(MAKE) clean -C source/native-plugins
  272. $(MAKE) clean -C source/plugin
  273. $(MAKE) clean -C source/theme
  274. rm -f $(RES)
  275. rm -f $(UIs)
  276. rm -f $(WIDGETS)
  277. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  278. distclean: clean
  279. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  280. rm -rf build build-lv2
  281. debug:
  282. $(MAKE) DEBUG=true
  283. doxygen:
  284. $(MAKE) doxygen -C source/backend
  285. stoat:
  286. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  287. # stoat --recursive ./build/ \
  288. # --suppression ./data/stoat-supression.txt \
  289. # --whitelist ./data/stoat-whitelist.txt \
  290. # --graph-view ./data/stoat-callgraph.png
  291. # ----------------------------------------------------------------------------------------------------------------------------
  292. install_main:
  293. # Create directories
  294. install -d $(DESTDIR)$(BINDIR)
  295. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  296. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  297. install -d $(DESTDIR)$(LIBDIR)/python3/dist-packages
  298. install -d $(DESTDIR)$(DATADIR)/carla
  299. install -d $(DESTDIR)$(DATADIR)/carla/resources
  300. install -d $(DESTDIR)$(INCLUDEDIR)/carla
  301. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  302. install -d $(DESTDIR)$(INCLUDEDIR)/carla/utils
  303. ifeq ($(HAVE_PYQT),true)
  304. # Create directories (gui)
  305. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  306. install -d $(DESTDIR)$(DATADIR)/applications
  307. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  308. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  309. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  310. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  311. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  312. install -d $(DESTDIR)$(DATADIR)/mime/packages
  313. endif
  314. ifeq ($(EXPERIMENTAL_PLUGINS),true)
  315. # Create directories (experimental plugins)
  316. install -d $(DESTDIR)$(DATADIR)/carla/resources/at1
  317. install -d $(DESTDIR)$(DATADIR)/carla/resources/bls1
  318. install -d $(DESTDIR)$(DATADIR)/carla/resources/rev1
  319. endif
  320. ifeq ($(HAVE_ZYN_DEPS),true)
  321. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  322. # Create directories (zynaddsubfx)
  323. install -d $(DESTDIR)$(DATADIR)/carla/resources/zynaddsubfx
  324. endif
  325. endif
  326. # --------------------------------------------------------------------------------------------------------------------
  327. # Install script files (non-gui)
  328. install -m 755 \
  329. data/carla-single \
  330. $(DESTDIR)$(BINDIR)
  331. # Adjust PREFIX value in script files (non-gui)
  332. sed -i 's?X-PREFIX-X?$(PREFIX)?' \
  333. $(DESTDIR)$(BINDIR)/carla-single
  334. # Install backend libs
  335. install -m 644 \
  336. bin/libcarla_*.* \
  337. $(DESTDIR)$(LIBDIR)/carla
  338. # Install other binaries
  339. install -m 755 \
  340. bin/*bridge-* \
  341. bin/carla-discovery-* \
  342. $(DESTDIR)$(LIBDIR)/carla
  343. ifeq ($(LINUX),true)
  344. # Install libjack
  345. install -m 755 \
  346. bin/jack/libjack.so.0 \
  347. $(DESTDIR)$(LIBDIR)/carla/jack
  348. endif
  349. # Install pkg-config files
  350. install -m 644 \
  351. data/*.pc \
  352. $(DESTDIR)$(LIBDIR)/pkgconfig
  353. # Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files
  354. sed -i 's?X-PREFIX-X?$(PREFIX)?' \
  355. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  356. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  357. sed -i 's?X-LIBDIR-X?$(LIBDIR)?' \
  358. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  359. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  360. sed -i 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  361. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  362. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  363. # Install python code (dist-packages)
  364. install -m 644 \
  365. source/carla_backend.py \
  366. source/carla_utils.py \
  367. $(DESTDIR)$(LIBDIR)/python3/dist-packages
  368. # Install headers
  369. install -m 644 \
  370. source/backend/CarlaBackend.h \
  371. source/backend/CarlaHost.h \
  372. source/backend/CarlaUtils.h \
  373. source/backend/CarlaEngine.hpp \
  374. source/backend/CarlaPlugin.hpp \
  375. source/includes/CarlaNative.h \
  376. $(DESTDIR)$(INCLUDEDIR)/carla
  377. install -m 644 \
  378. source/includes/CarlaDefines.h \
  379. source/includes/CarlaMIDI.h \
  380. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  381. install -m 644 \
  382. source/utils/CarlaUtils.hpp \
  383. source/utils/CarlaJuceUtils.hpp \
  384. source/utils/CarlaMathUtils.hpp \
  385. source/utils/CarlaPipeUtils.hpp \
  386. source/utils/CarlaPipeUtils.cpp \
  387. source/utils/CarlaExternalUI.hpp \
  388. source/utils/CarlaMutex.hpp \
  389. source/utils/CarlaString.hpp \
  390. $(DESTDIR)$(INCLUDEDIR)/carla/utils
  391. # --------------------------------------------------------------------------------------------------------------------
  392. ifeq ($(HAVE_PYQT),true)
  393. # Install script files (gui)
  394. install -m 755 \
  395. data/carla \
  396. data/carla-database \
  397. data/carla-jack-multi \
  398. data/carla-jack-single \
  399. data/carla-patchbay \
  400. data/carla-rack \
  401. data/carla-settings \
  402. $(DESTDIR)$(BINDIR)
  403. # Adjust PREFIX value in script files (gui)
  404. sed -i 's?X-PREFIX-X?$(PREFIX)?' \
  405. $(DESTDIR)$(BINDIR)/carla \
  406. $(DESTDIR)$(BINDIR)/carla-database \
  407. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  408. $(DESTDIR)$(BINDIR)/carla-jack-single \
  409. $(DESTDIR)$(BINDIR)/carla-patchbay \
  410. $(DESTDIR)$(BINDIR)/carla-rack \
  411. $(DESTDIR)$(BINDIR)/carla-settings
  412. ifeq ($(HAVE_LIBLO),true)
  413. install -m 755 \
  414. data/carla-control \
  415. $(DESTDIR)$(BINDIR)
  416. sed -i 's?X-PREFIX-X?$(PREFIX)?' \
  417. $(DESTDIR)$(BINDIR)/carla-control
  418. endif
  419. # Install the real modgui bridge
  420. install -m 755 \
  421. data/carla-bridge-lv2-modgui \
  422. $(DESTDIR)$(LIBDIR)/carla
  423. # Adjust PREFIX value in modgui bridge
  424. sed -i 's?X-PREFIX-X?$(PREFIX)?' \
  425. $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  426. # Install python code (gui)
  427. install -m 644 \
  428. source/carla \
  429. source/carla-control \
  430. source/carla-jack-multi \
  431. source/carla-jack-single \
  432. source/carla-patchbay \
  433. source/carla-rack \
  434. source/*.py \
  435. $(DESTDIR)$(DATADIR)/carla
  436. # Adjust LIBDIR and DATADIR value in python code
  437. sed -i 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  438. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  439. sed -i 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  440. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  441. # Install resources (gui)
  442. install -m 755 \
  443. bin/resources/carla-plugin \
  444. bin/resources/carla-plugin-patchbay \
  445. bin/resources/*-ui \
  446. $(DESTDIR)$(DATADIR)/carla/resources
  447. ifeq ($(HAVE_THEME),true)
  448. # Install theme
  449. install -m 644 \
  450. bin/styles/* \
  451. $(DESTDIR)$(LIBDIR)/carla/styles
  452. endif
  453. # Install desktop files
  454. install -m 644 data/carla.desktop $(DESTDIR)$(DATADIR)/applications
  455. ifeq ($(HAVE_LIBLO),true)
  456. install -m 644 data/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  457. endif
  458. # Install mime package
  459. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  460. # Install icons, 16x16
  461. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  462. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  463. # Install icons, 48x48
  464. install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  465. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  466. # Install icons, 128x128
  467. install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  468. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  469. # Install icons, 256x256
  470. install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  471. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  472. # Install icons, scalable
  473. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  474. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  475. # Install resources (re-use python files)
  476. $(LINK) $(DATADIR)/carla/carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  477. $(LINK) $(DATADIR)/carla/carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  478. $(LINK) $(DATADIR)/carla/carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  479. $(LINK) $(DATADIR)/carla/carla_config.py $(DESTDIR)$(DATADIR)/carla/resources
  480. $(LINK) $(DATADIR)/carla/carla_control.py $(DESTDIR)$(DATADIR)/carla/resources
  481. $(LINK) $(DATADIR)/carla/carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  482. $(LINK) $(DATADIR)/carla/carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  483. $(LINK) $(DATADIR)/carla/carla_modgui.py $(DESTDIR)$(DATADIR)/carla/resources
  484. $(LINK) $(DATADIR)/carla/carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  485. $(LINK) $(DATADIR)/carla/carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  486. $(LINK) $(DATADIR)/carla/carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  487. $(LINK) $(DATADIR)/carla/carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  488. $(LINK) $(DATADIR)/carla/carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  489. $(LINK) $(DATADIR)/carla/canvaspreviewframe.py $(DESTDIR)$(DATADIR)/carla/resources
  490. $(LINK) $(DATADIR)/carla/digitalpeakmeter.py $(DESTDIR)$(DATADIR)/carla/resources
  491. $(LINK) $(DATADIR)/carla/draggablegraphicsview.py $(DESTDIR)$(DATADIR)/carla/resources
  492. $(LINK) $(DATADIR)/carla/externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  493. $(LINK) $(DATADIR)/carla/ledbutton.py $(DESTDIR)$(DATADIR)/carla/resources
  494. $(LINK) $(DATADIR)/carla/paramspinbox.py $(DESTDIR)$(DATADIR)/carla/resources
  495. $(LINK) $(DATADIR)/carla/patchcanvas.py $(DESTDIR)$(DATADIR)/carla/resources
  496. $(LINK) $(DATADIR)/carla/patchcanvas_theme.py $(DESTDIR)$(DATADIR)/carla/resources
  497. $(LINK) $(DATADIR)/carla/pianoroll.py $(DESTDIR)$(DATADIR)/carla/resources
  498. $(LINK) $(DATADIR)/carla/pixmapbutton.py $(DESTDIR)$(DATADIR)/carla/resources
  499. $(LINK) $(DATADIR)/carla/pixmapdial.py $(DESTDIR)$(DATADIR)/carla/resources
  500. $(LINK) $(DATADIR)/carla/pixmapkeyboard.py $(DESTDIR)$(DATADIR)/carla/resources
  501. $(LINK) $(DATADIR)/carla/racklistwidget.py $(DESTDIR)$(DATADIR)/carla/resources
  502. $(LINK) $(DATADIR)/carla/resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  503. $(LINK) $(DATADIR)/carla/ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  504. $(LINK) $(DATADIR)/carla/ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  505. $(LINK) $(DATADIR)/carla/ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  506. $(LINK) $(DATADIR)/carla/ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  507. $(LINK) $(DATADIR)/carla/ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  508. $(LINK) $(DATADIR)/carla/ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  509. $(LINK) $(DATADIR)/carla/ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  510. $(LINK) $(DATADIR)/carla/ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  511. $(LINK) $(DATADIR)/carla/ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  512. $(LINK) $(DATADIR)/carla/ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  513. $(LINK) $(DATADIR)/carla/ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  514. $(LINK) $(DATADIR)/carla/ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  515. $(LINK) $(DATADIR)/carla/ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  516. $(LINK) $(DATADIR)/carla/ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  517. $(LINK) $(DATADIR)/carla/ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  518. $(LINK) $(DATADIR)/carla/ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  519. endif
  520. # --------------------------------------------------------------------------------------------------------------------
  521. # Install lv2 plugin
  522. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  523. install -m 644 \
  524. bin/carla.lv2/carla.* \
  525. bin/carla.lv2/*.ttl \
  526. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  527. # Link binaries for lv2 plugin
  528. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  529. $(LINK) $(LIBDIR)/carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  530. done
  531. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  532. # Link resources for lv2 plugin
  533. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  534. $(LINK) $(DATADIR)/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  535. ifeq ($(HAVE_PYQT),true)
  536. # Link styles for lv2 plugin
  537. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  538. $(LINK) $(LIBDIR)/carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  539. endif
  540. # --------------------------------------------------------------------------------------------------------------------
  541. ifeq ($(LINUX),true)
  542. ifeq ($(HAVE_X11),true)
  543. ifeq ($(HAVE_PYQT),true)
  544. # Install vst plugin
  545. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  546. install -m 644 \
  547. bin/CarlaRack*.* \
  548. bin/CarlaPatchbay*.* \
  549. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  550. # Link binaries for vst plugin
  551. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  552. $(LINK) $(LIBDIR)/carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  553. done
  554. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  555. # Link resources for vst plugin
  556. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  557. $(LINK) $(DATADIR)/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  558. # Link styles for vst plugin
  559. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  560. $(LINK) $(LIBDIR)/carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  561. endif
  562. endif
  563. endif
  564. # --------------------------------------------------------------------------------------------------------------------
  565. ifneq ($(HAVE_PYQT),true)
  566. # Remove gui files for non-gui build
  567. rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  568. rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
  569. endif
  570. ifneq ($(EXTERNAL_PLUGINS),true)
  571. install_external_plugins:
  572. endif
  573. install: install_main install_external_plugins
  574. # ----------------------------------------------------------------------------------------------------------------------------
  575. uninstall:
  576. rm -f $(DESTDIR)$(BINDIR)/carla*
  577. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
  578. rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
  579. rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
  580. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
  581. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
  582. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
  583. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
  584. rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
  585. rm -rf $(DESTDIR)$(LIBDIR)/carla
  586. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  587. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
  588. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
  589. rm -rf $(DESTDIR)$(DATADIR)/carla
  590. rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
  591. # ----------------------------------------------------------------------------------------------------------------------------
  592. USE_COLORS=true
  593. ifeq ($(HAIKU),true)
  594. USE_COLORS=false
  595. endif
  596. ifeq ($(USE_COLORS),true)
  597. ANS_NO=\033[31m NO \033[0m
  598. ANS_YES=\033[32m YES \033[0m
  599. mS=\033[33m[
  600. mZ=\033[30;1m[
  601. mE=]\033[0m
  602. tS=\033[36m
  603. tE=\033[0m
  604. else
  605. ANS_NO=" NO "
  606. ANS_YES=" YES "
  607. endif
  608. ifeq ($(DEFAULT_QT),4)
  609. FEV="Qt4"
  610. else
  611. FEV="Qt5"
  612. endif
  613. features_print_main:
  614. @echo "$(tS)---> Main features $(tE)"
  615. ifeq ($(HAVE_PYQT),true)
  616. @echo "Front-End: $(ANS_YES)(Using $(FEV))"
  617. ifneq ($(WIN32),true)
  618. @echo "LV2 plugin: $(ANS_YES)"
  619. else
  620. @echo "LV2 plugin: $(ANS_NO) $(mZ)Not available for Windows$(mE)"
  621. endif
  622. ifeq ($(LINUX),true)
  623. ifeq ($(HAVE_X11),true)
  624. @echo "VST plugin: $(ANS_YES)"
  625. else # HAVE_X11
  626. @echo "VST plugin: $(ANS_NO) $(mS)X11 missing$(mE)"
  627. endif
  628. else # LINUX
  629. @echo "VST plugin: $(ANS_NO) $(mZ)Linux only$(mE)"
  630. endif
  631. else
  632. @echo "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)"
  633. @echo "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)"
  634. @echo "VST plugin: $(ANS_NO) $(mS)No front-end$(mE)"
  635. endif
  636. ifeq ($(HAVE_HYLIA),true)
  637. @echo "Link support:$(ANS_YES)"
  638. else
  639. @echo "Link support:$(ANS_NO) $(mZ)Linux, MacOS and Windows only$(mE)"
  640. endif
  641. ifeq ($(HAVE_LIBLO),true)
  642. @echo "OSC support: $(ANS_YES)"
  643. else
  644. @echo "OSC support: $(ANS_NO) $(mS)Missing liblo$(mE)"
  645. endif
  646. @echo ""
  647. @echo "$(tS)---> Engine drivers $(tE)"
  648. @echo "JACK: $(ANS_YES)"
  649. ifeq ($(LINUX),true)
  650. ifeq ($(HAVE_ALSA),true)
  651. @echo "ALSA: $(ANS_YES)"
  652. else
  653. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  654. endif
  655. ifeq ($(HAVE_PULSEAUDIO),true)
  656. @echo "PulseAudio: $(ANS_YES)"
  657. else
  658. @echo "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  659. endif
  660. else
  661. @echo "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)"
  662. @echo "PulseAudio: $(ANS_NO) $(mZ)Linux only$(mE)"
  663. endif
  664. ifeq ($(MACOS),true)
  665. @echo "CoreAudio: $(ANS_YES)"
  666. else
  667. @echo "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)"
  668. endif
  669. ifeq ($(WIN32),true)
  670. @echo "ASIO: $(ANS_YES)"
  671. @echo "DirectSound:$(ANS_YES)"
  672. else
  673. @echo "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)"
  674. @echo "DirectSound:$(ANS_NO) $(mZ)Windows only$(mE)"
  675. endif
  676. @echo ""
  677. @echo "$(tS)---> Plugin formats: $(tE)"
  678. @echo "Internal:$(ANS_YES)"
  679. @echo "LADSPA: $(ANS_YES)"
  680. @echo "DSSI: $(ANS_YES)"
  681. @echo "LV2: $(ANS_YES)"
  682. ifeq ($(MACOS_OR_WIN32),true)
  683. @echo "VST: $(ANS_YES)(with UI)"
  684. else
  685. ifeq ($(LINUX),true)
  686. ifeq ($(HAVE_X11),true)
  687. @echo "VST: $(ANS_YES)(with UI)"
  688. else
  689. @echo "VST: $(ANS_YES)(without UI) $(mS)Missing X11$(mE)"
  690. endif
  691. else # LINUX
  692. @echo "VST: $(ANS_YES)(without UI) $(mZ)Linux, Mac and Windows only$(mE)"
  693. endif
  694. endif
  695. ifeq ($(MACOS_OR_WIN32),true)
  696. @echo "VST3: $(ANS_YES)"
  697. else
  698. @echo "VST3: $(ANS_NO) $(mZ)Windows and MacOS only$(mE)"
  699. endif
  700. ifeq ($(MACOS),true)
  701. @echo "AU: $(ANS_YES)"
  702. else
  703. @echo "AU: $(ANS_NO) $(mZ)MacOS only$(mE)"
  704. endif
  705. @echo ""
  706. @echo "$(tS)---> LV2 UI toolkit support: $(tE)"
  707. @echo "External:$(ANS_YES)(direct)"
  708. ifeq ($(LINUX),true)
  709. ifeq ($(HAVE_GTK2),true)
  710. @echo "Gtk2: $(ANS_YES)(bridge)"
  711. else
  712. @echo "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  713. endif
  714. ifeq ($(HAVE_GTK3),true)
  715. @echo "Gtk3: $(ANS_YES)(bridge)"
  716. else
  717. @echo "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  718. endif
  719. ifeq ($(HAVE_QT4),true)
  720. @echo "Qt4: $(ANS_YES)(bridge)"
  721. else
  722. @echo "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  723. endif
  724. ifeq ($(HAVE_QT5),true)
  725. @echo "Qt5: $(ANS_YES)(bridge)"
  726. else
  727. @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  728. endif
  729. ifeq ($(HAVE_X11),true)
  730. @echo "X11: $(ANS_YES)(direct+bridge)"
  731. else
  732. @echo "X11: $(ANS_NO) $(mS)X11 missing$(mE)"
  733. endif
  734. else # LINUX
  735. @echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
  736. @echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
  737. @echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
  738. @echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
  739. @echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
  740. endif # LINUX
  741. ifeq ($(MACOS),true)
  742. @echo "Cocoa: $(ANS_YES)(direct+bridge)"
  743. else
  744. @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
  745. endif
  746. ifeq ($(WIN32),true)
  747. @echo "Windows: $(ANS_YES)(direct+bridge)"
  748. else
  749. @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
  750. endif
  751. @echo ""
  752. @echo "$(tS)---> File formats: $(tE)"
  753. ifeq ($(HAVE_LINUXSAMPLER),true)
  754. @echo "GIG:$(ANS_YES)"
  755. else
  756. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing or too old$(mE)"
  757. endif
  758. ifeq ($(HAVE_FLUIDSYNTH),true)
  759. @echo "SF2:$(ANS_YES)"
  760. else
  761. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  762. endif
  763. ifeq ($(HAVE_LINUXSAMPLER),true)
  764. @echo "SFZ:$(ANS_YES)"
  765. else
  766. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing or too old$(mE)"
  767. endif
  768. @echo ""
  769. @echo "$(tS)---> Internal plugins: $(tE)"
  770. @echo "Basic Plugins: $(ANS_YES)"
  771. ifneq ($(WIN32),true)
  772. @echo "Carla-Patchbay: $(ANS_YES)"
  773. @echo "Carla-Rack: $(ANS_YES)"
  774. else
  775. @echo "Carla-Patchbay: $(ANS_NO) $(mS)Not available for Windows$(mE)"
  776. @echo "Carla-Rack: $(ANS_NO) $(mS)Not available for Windows$(mE)"
  777. endif
  778. ifeq ($(EXTERNAL_PLUGINS),true)
  779. @echo "External Plugins:$(ANS_YES)"
  780. else
  781. @echo "External Plugins:$(ANS_NO)"
  782. endif
  783. ifneq ($(EXTERNAL_PLUGINS),true)
  784. features_print_external_plugins:
  785. endif
  786. features: features_print_main features_print_external_plugins
  787. # ----------------------------------------------------------------------------------------------------------------------------
  788. .FORCE:
  789. .PHONY: .FORCE
  790. # ----------------------------------------------------------------------------------------------------------------------------