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.

913 lines
28KB

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