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.

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