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.

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