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.

909 lines
30KB

  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/pixmapbutton.py \
  213. bin/resources/pixmapdial.py \
  214. bin/resources/pixmapkeyboard.py \
  215. bin/resources/racklistwidget.py \
  216. bin/resources/resources_rc.py \
  217. bin/resources/ui_carla_about.py \
  218. bin/resources/ui_carla_about_juce.py \
  219. bin/resources/ui_carla_database.py \
  220. bin/resources/ui_carla_edit.py \
  221. bin/resources/ui_carla_host.py \
  222. bin/resources/ui_carla_panel_time.py \
  223. bin/resources/ui_carla_parameter.py \
  224. bin/resources/ui_carla_plugin_calf.py \
  225. bin/resources/ui_carla_plugin_classic.py \
  226. bin/resources/ui_carla_plugin_compact.py \
  227. bin/resources/ui_carla_plugin_default.py \
  228. bin/resources/ui_carla_plugin_presets.py \
  229. bin/resources/ui_carla_refresh.py \
  230. bin/resources/ui_carla_settings.py \
  231. bin/resources/ui_carla_settings_driver.py \
  232. bin/resources/ui_inputdialog_value.py \
  233. source/carla_config.py \
  234. source/resources_rc.py
  235. RES: $(RES)
  236. source/carla_config.py:
  237. @echo "#!/usr/bin/env python3" > $@
  238. @echo "# -*- coding: utf-8 -*-" >> $@
  239. ifeq ($(DEFAULT_QT),4)
  240. @echo "config_UseQt5 = False" >> $@
  241. else
  242. @echo "config_UseQt5 = True" >> $@
  243. endif
  244. source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg
  245. $(PYRCC) $< -o $@
  246. bin/resources/%.py: source/%.py
  247. $(LINK) $(CURDIR)/source/$*.py bin/resources/
  248. else
  249. RES:
  250. endif
  251. # ----------------------------------------------------------------------------------------------------------------------------
  252. # UI code
  253. ifeq ($(HAVE_PYQT),true)
  254. UIs = \
  255. source/ui_carla_about.py \
  256. source/ui_carla_about_juce.py \
  257. source/ui_carla_database.py \
  258. source/ui_carla_edit.py \
  259. source/ui_carla_host.py \
  260. source/ui_carla_panel_time.py \
  261. source/ui_carla_parameter.py \
  262. source/ui_carla_plugin_calf.py \
  263. source/ui_carla_plugin_classic.py \
  264. source/ui_carla_plugin_compact.py \
  265. source/ui_carla_plugin_default.py \
  266. source/ui_carla_plugin_presets.py \
  267. source/ui_carla_refresh.py \
  268. source/ui_carla_settings.py \
  269. source/ui_carla_settings_driver.py \
  270. source/ui_inputdialog_value.py
  271. UI: $(UIs)
  272. source/ui_%.py: resources/ui/%.ui
  273. $(PYUIC) $< -o $@
  274. else
  275. UI:
  276. endif
  277. # ----------------------------------------------------------------------------------------------------------------------------
  278. # Widgets
  279. WIDGETS = \
  280. source/canvaspreviewframe.py \
  281. source/digitalpeakmeter.py \
  282. source/ledbutton.py \
  283. source/paramspinbox.py \
  284. source/pixmapbutton.py \
  285. source/pixmapdial.py \
  286. source/pixmapkeyboard.py \
  287. source/racklistwidget.py
  288. WIDGETS: $(WIDGETS)
  289. source/%.py: source/widgets/%.py
  290. $(LINK) widgets/$*.py $@
  291. # ----------------------------------------------------------------------------------------------------------------------------
  292. clean:
  293. $(MAKE) clean -C source/backend
  294. $(MAKE) clean -C source/bridges-plugin
  295. $(MAKE) clean -C source/bridges-ui
  296. $(MAKE) clean -C source/discovery
  297. $(MAKE) clean -C source/modules
  298. $(MAKE) clean -C source/plugin
  299. rm -f $(RES)
  300. rm -f $(UIs)
  301. rm -f $(WIDGETS)
  302. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  303. distclean: clean
  304. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  305. rm -rf build build-lv2
  306. debug:
  307. $(MAKE) DEBUG=true
  308. doxygen:
  309. $(MAKE) doxygen -C source/backend
  310. stoat:
  311. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  312. # stoat --recursive ./build/ \
  313. # --suppression ./data/stoat-supression.txt \
  314. # --whitelist ./data/stoat-whitelist.txt \
  315. # --graph-view ./data/stoat-callgraph.png
  316. # ----------------------------------------------------------------------------------------------------------------------------
  317. install:
  318. # Create directories
  319. install -d $(DESTDIR)$(PREFIX)/bin/
  320. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  321. install -d $(DESTDIR)$(PREFIX)/lib/carla/styles/
  322. install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig/
  323. install -d $(DESTDIR)$(PREFIX)/include/carla/
  324. install -d $(DESTDIR)$(PREFIX)/include/carla/includes/
  325. install -d $(DESTDIR)$(PREFIX)/share/applications/
  326. install -d $(DESTDIR)$(PREFIX)/share/carla/
  327. install -d $(DESTDIR)$(PREFIX)/share/carla/resources/
  328. ifeq ($(EXPERIMENTAL_PLUGINS),true)
  329. install -d $(DESTDIR)$(PREFIX)/share/carla/resources/at1/
  330. install -d $(DESTDIR)$(PREFIX)/share/carla/resources/bls1/
  331. install -d $(DESTDIR)$(PREFIX)/share/carla/resources/rev1/
  332. endif
  333. ifeq ($(HAVE_ZYN_DEPS),true)
  334. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  335. install -d $(DESTDIR)$(PREFIX)/share/carla/resources/zynaddsubfx/
  336. endif
  337. endif
  338. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  339. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  340. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  341. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  342. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  343. install -d $(DESTDIR)$(PREFIX)/share/mime/packages/
  344. # --------------------------------------------------------------------------------------------------------------------
  345. # Install script files
  346. install -m 755 \
  347. data/carla \
  348. data/carla-control \
  349. data/carla-database \
  350. data/carla-patchbay \
  351. data/carla-rack \
  352. data/carla-single \
  353. data/carla-settings \
  354. $(DESTDIR)$(PREFIX)/bin/
  355. # data/carla-control \
  356. # Install desktop files
  357. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  358. # Install icons, 16x16
  359. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  360. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  361. # Install icons, 48x48
  362. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  363. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  364. # Install icons, 128x128
  365. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  366. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  367. # Install icons, 256x256
  368. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  369. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  370. # Install icons, scalable
  371. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  372. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  373. # Install mime package
  374. install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/
  375. # Install pkg-config files
  376. install -m 644 data/*.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/
  377. # Install backend libs
  378. install -m 644 \
  379. bin/libcarla_*.* \
  380. $(DESTDIR)$(PREFIX)/lib/carla/
  381. # Install other binaries
  382. install -m 755 \
  383. bin/*bridge-* \
  384. bin/carla-discovery-* \
  385. $(DESTDIR)$(PREFIX)/lib/carla/
  386. # Install the real modgui bridge
  387. install -m 755 \
  388. data/carla-bridge-lv2-modgui \
  389. $(DESTDIR)$(PREFIX)/lib/carla/
  390. ifeq ($(HAVE_QT),true)
  391. # Install theme
  392. install -m 644 \
  393. bin/styles/* \
  394. $(DESTDIR)$(PREFIX)/lib/carla/styles/
  395. endif
  396. # Install python code
  397. install -m 644 \
  398. source/carla \
  399. source/carla-control \
  400. source/carla-patchbay \
  401. source/carla-rack \
  402. source/*.py \
  403. $(DESTDIR)$(PREFIX)/share/carla/
  404. # Install headers
  405. install -m 644 \
  406. source/backend/CarlaBackend.h \
  407. source/backend/CarlaHost.h \
  408. source/backend/CarlaUtils.h \
  409. source/backend/CarlaEngine.hpp \
  410. source/backend/CarlaPlugin.hpp \
  411. source/includes/CarlaNative.h \
  412. $(DESTDIR)$(PREFIX)/include/carla/
  413. install -m 644 \
  414. source/includes/CarlaDefines.h \
  415. $(DESTDIR)$(PREFIX)/include/carla/includes/
  416. # Install resources
  417. install -m 755 \
  418. bin/resources/carla-plugin \
  419. bin/resources/carla-plugin-patchbay \
  420. bin/resources/*-ui \
  421. $(DESTDIR)$(PREFIX)/share/carla/resources/
  422. ifeq ($(EXPERIMENTAL_PLUGINS),true)
  423. install -m 644 \
  424. bin/resources/at1/*.png \
  425. $(DESTDIR)$(PREFIX)/share/carla/resources/at1/
  426. install -m 644 \
  427. bin/resources/bls1/*.png \
  428. $(DESTDIR)$(PREFIX)/share/carla/resources/bls1/
  429. install -m 644 \
  430. bin/resources/rev1/*.png \
  431. $(DESTDIR)$(PREFIX)/share/carla/resources/rev1/
  432. install -m 755 \
  433. bin/resources/at1-ui \
  434. bin/resources/bls1-ui \
  435. bin/resources/rev1-ui \
  436. $(DESTDIR)$(PREFIX)/share/carla/resources/
  437. endif
  438. ifeq ($(HAVE_ZYN_DEPS),true)
  439. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  440. install -m 644 \
  441. bin/resources/zynaddsubfx/*.png \
  442. $(DESTDIR)$(PREFIX)/share/carla/resources/zynaddsubfx/
  443. install -m 755 \
  444. bin/resources/zynaddsubfx-ui \
  445. $(DESTDIR)$(PREFIX)/share/carla/resources/
  446. endif
  447. endif
  448. # Install resources (re-use python files)
  449. $(LINK) $(PREFIX)/share/carla/carla_app.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  450. $(LINK) $(PREFIX)/share/carla/carla_backend.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  451. $(LINK) $(PREFIX)/share/carla/carla_backend_qt.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  452. $(LINK) $(PREFIX)/share/carla/carla_config.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  453. $(LINK) $(PREFIX)/share/carla/carla_control.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  454. $(LINK) $(PREFIX)/share/carla/carla_database.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  455. $(LINK) $(PREFIX)/share/carla/carla_host.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  456. $(LINK) $(PREFIX)/share/carla/carla_modgui.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  457. $(LINK) $(PREFIX)/share/carla/carla_panels.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  458. $(LINK) $(PREFIX)/share/carla/carla_settings.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  459. $(LINK) $(PREFIX)/share/carla/carla_skin.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  460. $(LINK) $(PREFIX)/share/carla/carla_shared.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  461. $(LINK) $(PREFIX)/share/carla/carla_utils.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  462. $(LINK) $(PREFIX)/share/carla/carla_widgets.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  463. $(LINK) $(PREFIX)/share/carla/canvaspreviewframe.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  464. $(LINK) $(PREFIX)/share/carla/digitalpeakmeter.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  465. $(LINK) $(PREFIX)/share/carla/externalui.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  466. $(LINK) $(PREFIX)/share/carla/ledbutton.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  467. $(LINK) $(PREFIX)/share/carla/paramspinbox.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  468. $(LINK) $(PREFIX)/share/carla/patchcanvas.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  469. $(LINK) $(PREFIX)/share/carla/patchcanvas_theme.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  470. $(LINK) $(PREFIX)/share/carla/pixmapbutton.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  471. $(LINK) $(PREFIX)/share/carla/pixmapdial.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  472. $(LINK) $(PREFIX)/share/carla/pixmapkeyboard.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  473. $(LINK) $(PREFIX)/share/carla/racklistwidget.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  474. $(LINK) $(PREFIX)/share/carla/resources_rc.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  475. $(LINK) $(PREFIX)/share/carla/ui_carla_about.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  476. $(LINK) $(PREFIX)/share/carla/ui_carla_about_juce.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  477. $(LINK) $(PREFIX)/share/carla/ui_carla_database.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  478. $(LINK) $(PREFIX)/share/carla/ui_carla_edit.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  479. $(LINK) $(PREFIX)/share/carla/ui_carla_host.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  480. $(LINK) $(PREFIX)/share/carla/ui_carla_panel_time.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  481. $(LINK) $(PREFIX)/share/carla/ui_carla_parameter.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  482. $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_calf.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  483. $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_classic.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  484. $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_compact.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  485. $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_default.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  486. $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_presets.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  487. $(LINK) $(PREFIX)/share/carla/ui_carla_refresh.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  488. $(LINK) $(PREFIX)/share/carla/ui_carla_settings.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  489. $(LINK) $(PREFIX)/share/carla/ui_carla_settings_driver.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  490. $(LINK) $(PREFIX)/share/carla/ui_inputdialog_value.py $(DESTDIR)$(PREFIX)/share/carla/resources/
  491. # Adjust PREFIX value in script files
  492. sed -i "s?X-PREFIX-X?$(PREFIX)?" \
  493. $(DESTDIR)$(PREFIX)/bin/carla \
  494. $(DESTDIR)$(PREFIX)/bin/carla-control \
  495. $(DESTDIR)$(PREFIX)/bin/carla-database \
  496. $(DESTDIR)$(PREFIX)/bin/carla-patchbay \
  497. $(DESTDIR)$(PREFIX)/bin/carla-rack \
  498. $(DESTDIR)$(PREFIX)/bin/carla-single \
  499. $(DESTDIR)$(PREFIX)/bin/carla-settings \
  500. $(DESTDIR)$(PREFIX)/lib/carla/carla-bridge-lv2-modgui \
  501. $(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-standalone.pc \
  502. $(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-utils.pc
  503. # --------------------------------------------------------------------------------------------------------------------
  504. # Install lv2 plugin
  505. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  506. install -m 644 \
  507. bin/carla.lv2/carla.* \
  508. bin/carla.lv2/*.ttl \
  509. $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  510. # Link binaries for lv2 plugin
  511. @for i in $(shell find $(DESTDIR)$(PREFIX)/lib/carla/ -maxdepth 1 -type f -exec basename {} ';'); do \
  512. $(LINK) $(PREFIX)/lib/carla/$$i $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/; \
  513. $(LINK) $(PREFIX)/lib/carla/$$i $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/; \
  514. done
  515. rm -f $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/libcarla_standalone2.*
  516. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/libcarla_standalone2.*
  517. # Link styles for lv2 plugin
  518. $(LINK) $(PREFIX)/lib/carla/styles $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  519. # Link resources for lv2 plugin
  520. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/resources
  521. $(LINK) $(PREFIX)/share/carla/resources/ $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  522. # --------------------------------------------------------------------------------------------------------------------
  523. ifeq ($(LINUX),true)
  524. ifeq ($(HAVE_X11),true)
  525. ifeq ($(DEFAULT_QT),4)
  526. # Install vst plugin
  527. install -d $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/
  528. install -m 644 \
  529. bin/CarlaRack*.* \
  530. bin/CarlaPatchbay*.* \
  531. $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/
  532. # Link binaries for vst plugin
  533. @for i in $(shell find $(DESTDIR)$(PREFIX)/lib/carla/ -maxdepth 1 -type f -exec basename {} ';'); do \
  534. $(LINK) $(PREFIX)/lib/carla/$$i $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/; \
  535. done
  536. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/libcarla_standalone2.*
  537. # Link styles for vst plugin
  538. $(LINK) $(PREFIX)/lib/carla/styles $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/
  539. # Link resources for vst plugin
  540. rm -rf $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/resources
  541. $(LINK) $(PREFIX)/share/carla/resources/ $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/
  542. endif
  543. endif
  544. endif
  545. # ----------------------------------------------------------------------------------------------------------------------------
  546. uninstall:
  547. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  548. rm -f $(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-standalone.pc
  549. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  550. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  551. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  552. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  553. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  554. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  555. rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/carla.xml
  556. rm -rf $(DESTDIR)$(PREFIX)/include/carla/
  557. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  558. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  559. rm -rf $(DESTDIR)$(PREFIX)/lib/vst/carla.vst/
  560. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  561. # ----------------------------------------------------------------------------------------------------------------------------
  562. USE_COLORS=true
  563. ifeq ($(HAIKU),true)
  564. USE_COLORS=false
  565. endif
  566. ifeq ($(USE_COLORS),true)
  567. ANS_NO=\033[31m NO \033[0m
  568. ANS_YES=\033[32m YES \033[0m
  569. mS=\033[33m[
  570. mZ=\033[30;1m[
  571. mE=]\033[0m
  572. tS=\033[36m
  573. tE=\033[0m
  574. else
  575. ANS_NO=" NO "
  576. ANS_YES=" YES "
  577. endif
  578. ifeq ($(DEFAULT_QT),4)
  579. FEV="Qt4"
  580. else
  581. FEV="Qt5"
  582. endif
  583. features:
  584. @echo "$(tS)---> Main features $(tE)"
  585. ifeq ($(HAVE_PYQT),true)
  586. @echo "Front-End: $(ANS_YES)(Using $(FEV))"
  587. ifneq ($(WIN32),true)
  588. @echo "LV2 plugin: $(ANS_YES)"
  589. else
  590. @echo "LV2 plugin: $(ANS_NO) $(mZ)Not available for Windows$(mE)"
  591. endif
  592. ifeq ($(LINUX),true)
  593. ifeq ($(DEFAULT_QT),4)
  594. ifeq ($(HAVE_X11),true)
  595. @echo "VST plugin: $(ANS_YES)"
  596. else # HAVE_X11
  597. @echo "VST plugin: $(ANS_NO) $(mS)X11 missing$(mE)"
  598. endif
  599. else # DEFAULT_QT
  600. @echo "VST plugin: $(ANS_NO) $(mZ)Qt4 only$(mE)"
  601. endif
  602. else # LINUX
  603. @echo "VST plugin: $(ANS_NO) $(mZ)Linux only$(mE)"
  604. endif
  605. else
  606. @echo "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)"
  607. @echo "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)"
  608. @echo "VST plugin: $(ANS_NO) $(mS)No front-end$(mE)"
  609. endif
  610. ifeq ($(HAVE_LIBLO),true)
  611. @echo "OSC support:$(ANS_YES)"
  612. else
  613. @echo "OSC support:$(ANS_NO) $(mS)Missing liblo$(mE)"
  614. endif
  615. @echo ""
  616. @echo "$(tS)---> Engine drivers $(tE)"
  617. @echo "JACK: $(ANS_YES)"
  618. ifeq ($(LINUX),true)
  619. ifeq ($(HAVE_ALSA),true)
  620. @echo "ALSA: $(ANS_YES)"
  621. else
  622. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  623. endif
  624. ifeq ($(HAVE_PULSEAUDIO),true)
  625. @echo "PulseAudio: $(ANS_YES)"
  626. else
  627. @echo "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  628. endif
  629. else
  630. @echo "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)"
  631. @echo "PulseAudio: $(ANS_NO) $(mZ)Linux only$(mE)"
  632. endif
  633. ifeq ($(MACOS),true)
  634. @echo "CoreAudio: $(ANS_YES)"
  635. else
  636. @echo "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)"
  637. endif
  638. ifeq ($(WIN32),true)
  639. @echo "ASIO: $(ANS_YES)"
  640. @echo "DirectSound:$(ANS_YES)"
  641. else
  642. @echo "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)"
  643. @echo "DirectSound:$(ANS_NO) $(mZ)Windows only$(mE)"
  644. endif
  645. @echo ""
  646. @echo "$(tS)---> Plugin formats: $(tE)"
  647. @echo "Internal:$(ANS_YES)"
  648. @echo "LADSPA: $(ANS_YES)"
  649. @echo "DSSI: $(ANS_YES)"
  650. @echo "LV2: $(ANS_YES)"
  651. ifeq ($(MACOS_OR_WIN32),true)
  652. @echo "VST: $(ANS_YES)(with UI)"
  653. else
  654. ifeq ($(LINUX),true)
  655. ifeq ($(HAVE_X11),true)
  656. @echo "VST: $(ANS_YES)(with UI)"
  657. else
  658. @echo "VST: $(ANS_YES)(without UI) $(mS)Missing X11$(mE)"
  659. endif
  660. else # LINUX
  661. @echo "VST: $(ANS_YES)(without UI) $(mZ)Linux, Mac and Windows only$(mE)"
  662. endif
  663. endif
  664. ifeq ($(MACOS_OR_WIN32),true)
  665. @echo "VST3: $(ANS_YES)"
  666. else
  667. @echo "VST3: $(ANS_NO) $(mZ)Windows and MacOS only$(mE)"
  668. endif
  669. ifeq ($(MACOS),true)
  670. @echo "AU: $(ANS_YES)"
  671. else
  672. @echo "AU: $(ANS_NO) $(mZ)MacOS only$(mE)"
  673. endif
  674. @echo ""
  675. @echo "$(tS)---> LV2 UI toolkit support: $(tE)"
  676. @echo "External:$(ANS_YES)(direct)"
  677. ifeq ($(LINUX),true)
  678. ifeq ($(HAVE_GTK2),true)
  679. @echo "Gtk2: $(ANS_YES)(bridge)"
  680. else
  681. @echo "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  682. endif
  683. ifeq ($(HAVE_GTK3),true)
  684. @echo "Gtk3: $(ANS_YES)(bridge)"
  685. else
  686. @echo "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  687. endif
  688. ifeq ($(HAVE_QT4),true)
  689. @echo "Qt4: $(ANS_YES)(bridge)"
  690. else
  691. @echo "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  692. endif
  693. ifeq ($(HAVE_QT5),true)
  694. @echo "Qt5: $(ANS_YES)(bridge)"
  695. else
  696. @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  697. endif
  698. ifeq ($(HAVE_X11),true)
  699. @echo "X11: $(ANS_YES)(direct+bridge)"
  700. else
  701. @echo "X11: $(ANS_NO) $(mS)X11 missing$(mE)"
  702. endif
  703. else # LINUX
  704. @echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
  705. @echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
  706. @echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
  707. @echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
  708. @echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
  709. endif # LINUX
  710. ifeq ($(MACOS),true)
  711. @echo "Cocoa: $(ANS_YES)(direct+bridge)"
  712. else
  713. @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
  714. endif
  715. ifeq ($(WIN32),true)
  716. @echo "Windows: $(ANS_YES)(direct+bridge)"
  717. else
  718. @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
  719. endif
  720. @echo ""
  721. @echo "$(tS)---> File formats: $(tE)"
  722. ifeq ($(HAVE_LINUXSAMPLER),true)
  723. @echo "GIG:$(ANS_YES)"
  724. else
  725. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing or too old$(mE)"
  726. endif
  727. ifeq ($(HAVE_FLUIDSYNTH),true)
  728. @echo "SF2:$(ANS_YES)"
  729. else
  730. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  731. endif
  732. ifeq ($(HAVE_LINUXSAMPLER),true)
  733. @echo "SFZ:$(ANS_YES)"
  734. else
  735. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing or too old$(mE)"
  736. endif
  737. @echo ""
  738. @echo "$(tS)---> Internal plugins: $(tE)"
  739. ifneq ($(WIN32),true)
  740. @echo "Carla-Patchbay: $(ANS_YES)"
  741. @echo "Carla-Rack: $(ANS_YES)"
  742. else
  743. @echo "Carla-Patchbay: $(ANS_NO) $(mS)Not available for Windows$(mE)"
  744. @echo "Carla-Rack: $(ANS_NO) $(mS)Not available for Windows$(mE)"
  745. endif
  746. ifeq ($(HAVE_DGL),true)
  747. @echo "DISTRHO Plugins:$(ANS_YES)(with UI)"
  748. else
  749. @echo "DISTRHO Plugins:$(ANS_YES)(without UI)"
  750. endif
  751. ifeq ($(HAVE_PROJECTM),true)
  752. @echo "DISTRHO ProM: $(ANS_YES)"
  753. else
  754. @echo "DISTRHO ProM: $(ANS_NO) (missing libprojectM)"
  755. endif
  756. ifeq ($(HAVE_ZYN_DEPS),true)
  757. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  758. ifeq ($(HAVE_NTK),true)
  759. @echo "ZynAddSubFX: $(ANS_YES)(with NTK UI)"
  760. else
  761. @echo "ZynAddSubFX: $(ANS_YES)(with FLTK UI)"
  762. endif
  763. else
  764. @echo "ZynAddSubFX: $(ANS_YES)(without UI) $(mS)FLTK or NTK missing$(mE)"
  765. endif
  766. else
  767. @echo "ZynAddSubFX: $(ANS_NO) $(mS)fftw3, mxml or zlib missing$(mE)"
  768. endif
  769. # ----------------------------------------------------------------------------------------------------------------------------
  770. .FORCE:
  771. .PHONY: .FORCE
  772. # ----------------------------------------------------------------------------------------------------------------------------