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.

961 lines
31KB

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