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.

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