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.

985 lines
30KB

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