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.

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