Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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