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.

958 lines
30KB

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