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.

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