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.

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