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.

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