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.

818 lines
27KB

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