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.

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