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.

939 lines
29KB

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