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.

908 lines
28KB

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