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.

889 lines
29KB

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