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.

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