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.

795 lines
25KB

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