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.

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