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.

971 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:
  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/theme
  299. rm -f *~ source/*~
  300. distclean: clean
  301. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  302. rm -rf build build-lv2
  303. cpp:
  304. $(MAKE) CPPMODE=true
  305. debug:
  306. $(MAKE) DEBUG=true
  307. doxygen:
  308. $(MAKE) doxygen -C source/backend
  309. stoat:
  310. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  311. # stoat --recursive ./build/ \
  312. # --suppression ./data/stoat-supression.txt \
  313. # --whitelist ./data/stoat-whitelist.txt \
  314. # --graph-view ./data/stoat-callgraph.png
  315. # ---------------------------------------------------------------------------------------------------------------------
  316. install_main:
  317. # Create directories
  318. install -d $(DESTDIR)$(BINDIR)
  319. ifeq ($(LINUX),true)
  320. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  321. else
  322. install -d $(DESTDIR)$(LIBDIR)/carla
  323. endif
  324. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  325. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  326. ifeq ($(LINUX),true)
  327. ifeq ($(HAVE_JACK),true)
  328. ifeq ($(JACKBRIDGE_DIRECT),true)
  329. install -d $(DESTDIR)$(JACK_LIBDIR)
  330. endif
  331. endif
  332. endif
  333. ifeq ($(HAVE_PYQT),true)
  334. # Create directories (gui)
  335. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  336. install -d $(DESTDIR)$(DATADIR)/applications
  337. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  338. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  339. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  340. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  341. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  342. install -d $(DESTDIR)$(DATADIR)/mime/packages
  343. install -d $(DESTDIR)$(DATADIR)/carla/resources
  344. install -d $(DESTDIR)$(DATADIR)/carla/modgui
  345. install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
  346. install -d $(DESTDIR)$(DATADIR)/carla/widgets
  347. endif
  348. # -------------------------------------------------------------------------------------------------------------
  349. # Install script files (non-gui)
  350. install -m 755 \
  351. data/carla-single \
  352. $(DESTDIR)$(BINDIR)
  353. # Adjust PREFIX value in script files (non-gui)
  354. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  355. $(DESTDIR)$(BINDIR)/carla-single
  356. # Install backend libs
  357. install -m 644 \
  358. bin/libcarla_*.* \
  359. $(DESTDIR)$(LIBDIR)/carla
  360. # Install other binaries
  361. install -m 755 \
  362. bin/*bridge-* \
  363. bin/carla-discovery-* \
  364. $(DESTDIR)$(LIBDIR)/carla
  365. ifeq ($(LINUX),true)
  366. ifeq ($(HAVE_JACK),true)
  367. ifeq ($(JACKBRIDGE_DIRECT),true)
  368. # Install internal jack client
  369. ln -sf \
  370. $(LIBDIR)/carla/libcarla_standalone2.so \
  371. $(DESTDIR)$(JACK_LIBDIR)/carla.so
  372. endif
  373. endif
  374. ifneq ($(JACKBRIDGE_DIRECT),true)
  375. # Install custom libjack
  376. install -m 755 \
  377. bin/jack/libjack.so.0 \
  378. $(DESTDIR)$(LIBDIR)/carla/jack
  379. endif
  380. endif
  381. # Install pkg-config files
  382. install -m 644 \
  383. data/*.pc \
  384. $(DESTDIR)$(LIBDIR)/pkgconfig
  385. # Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files
  386. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  387. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  388. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  389. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  390. sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
  391. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  392. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  393. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  394. sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  395. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  396. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  397. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  398. # Install headers
  399. install -m 644 \
  400. source/backend/CarlaBackend.h \
  401. source/backend/CarlaHost.h \
  402. source/backend/CarlaUtils.h \
  403. source/backend/CarlaEngine.hpp \
  404. source/backend/CarlaPlugin.hpp \
  405. source/includes/CarlaNative.h \
  406. $(DESTDIR)$(INCLUDEDIR)/carla
  407. install -m 644 \
  408. source/includes/CarlaDefines.h \
  409. source/includes/CarlaMIDI.h \
  410. source/includes/CarlaNative.h \
  411. source/includes/CarlaNativePlugin.h \
  412. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  413. # -------------------------------------------------------------------------------------------------------------
  414. ifeq ($(HAVE_PYQT),true)
  415. ifeq ($(CPPMODE),true)
  416. # Install script files (gui)
  417. install -m 755 \
  418. data/carla \
  419. data/carla-database \
  420. data/carla-jack-multi \
  421. data/carla-jack-single \
  422. data/carla-patchbay \
  423. data/carla-rack \
  424. data/carla-settings \
  425. $(DESTDIR)$(BINDIR)
  426. # Adjust PREFIX value in script files (gui)
  427. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  428. $(DESTDIR)$(BINDIR)/carla \
  429. $(DESTDIR)$(BINDIR)/carla-database \
  430. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  431. $(DESTDIR)$(BINDIR)/carla-jack-single \
  432. $(DESTDIR)$(BINDIR)/carla-patchbay \
  433. $(DESTDIR)$(BINDIR)/carla-rack \
  434. $(DESTDIR)$(BINDIR)/carla-settings
  435. ifeq ($(HAVE_LIBLO),true)
  436. install -m 755 \
  437. data/carla-control \
  438. $(DESTDIR)$(BINDIR)
  439. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  440. $(DESTDIR)$(BINDIR)/carla-control
  441. endif
  442. # Install the real modgui bridge
  443. install -m 755 \
  444. data/carla-bridge-lv2-modgui \
  445. $(DESTDIR)$(LIBDIR)/carla
  446. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  447. $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  448. # Install frontend
  449. install -m 644 \
  450. source/frontend/carla \
  451. source/frontend/carla-control \
  452. source/frontend/carla-jack-multi \
  453. source/frontend/carla-jack-single \
  454. source/frontend/carla-patchbay \
  455. source/frontend/carla-rack \
  456. source/frontend/*.py \
  457. $(DESTDIR)$(DATADIR)/carla/
  458. install -m 644 \
  459. source/frontend/modgui/*.py \
  460. $(DESTDIR)$(DATADIR)/carla/modgui/
  461. install -m 644 \
  462. source/frontend/patchcanvas/*.py \
  463. $(DESTDIR)$(DATADIR)/carla/patchcanvas/
  464. install -m 644 \
  465. source/frontend/widgets/*.py \
  466. $(DESTDIR)$(DATADIR)/carla/widgets/
  467. # Adjust LIBDIR and DATADIR value in python code
  468. sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  469. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  470. sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  471. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  472. # Install resources (gui)
  473. install -m 755 \
  474. bin/resources/carla-plugin \
  475. bin/resources/carla-plugin-patchbay \
  476. bin/resources/*-ui \
  477. $(DESTDIR)$(DATADIR)/carla/resources
  478. endif # CPPMODE
  479. ifeq ($(HAVE_THEME),true)
  480. # Install theme
  481. install -m 644 \
  482. bin/styles/* \
  483. $(DESTDIR)$(LIBDIR)/carla/styles
  484. endif
  485. # Install desktop files
  486. install -m 644 data/carla.desktop $(DESTDIR)$(DATADIR)/applications
  487. ifeq ($(HAVE_LIBLO),true)
  488. install -m 644 data/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  489. endif
  490. # Install mime package
  491. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  492. # Install icons, 16x16
  493. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  494. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  495. # Install icons, 48x48
  496. install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  497. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  498. # Install icons, 128x128
  499. install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  500. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  501. # Install icons, 256x256
  502. install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  503. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  504. # Install icons, scalable
  505. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  506. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  507. # Install resources (re-use python files)
  508. $(LINK) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
  509. $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
  510. $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
  511. $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  512. $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  513. $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  514. $(LINK) ../carla_control.py $(DESTDIR)$(DATADIR)/carla/resources
  515. $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  516. $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  517. $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  518. $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  519. $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  520. $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  521. $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  522. $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  523. $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  524. $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  525. $(LINK) ../ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources
  526. $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  527. $(LINK) ../ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  528. $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  529. $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  530. $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  531. $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  532. $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  533. $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  534. $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  535. $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  536. $(LINK) ../ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  537. $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  538. $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  539. $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  540. $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  541. endif # HAVE_PYQT
  542. # -------------------------------------------------------------------------------------------------------------
  543. # Install lv2 plugin
  544. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  545. install -m 644 \
  546. bin/carla.lv2/carla.* \
  547. bin/carla.lv2/*.ttl \
  548. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  549. # Link binaries for lv2 plugin
  550. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  551. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  552. done
  553. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  554. ifeq ($(LINUX),true)
  555. # Link jack app bridge
  556. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  557. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  558. endif
  559. ifeq ($(HAVE_PYQT),true)
  560. # Link resources for lv2 plugin
  561. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  562. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  563. # Link styles for lv2 plugin
  564. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  565. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  566. endif
  567. # -------------------------------------------------------------------------------------------------------------
  568. ifneq ($(HAIKU),true)
  569. ifeq ($(HAVE_PYQT),true)
  570. # Install vst plugin
  571. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  572. install -m 644 \
  573. bin/CarlaRack*.* \
  574. bin/CarlaPatchbay*.* \
  575. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  576. # Link binaries for vst plugin
  577. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  578. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  579. done
  580. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  581. # Link jack app bridge
  582. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  583. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  584. # Link resources for vst plugin
  585. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  586. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  587. # Link styles for vst plugin
  588. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  589. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  590. endif
  591. endif
  592. # -------------------------------------------------------------------------------------------------------------
  593. ifneq ($(HAVE_PYQT),true)
  594. # Remove gui files for non-gui build
  595. rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  596. rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
  597. endif
  598. # ---------------------------------------------------------------------------------------------------------------------
  599. ifneq ($(EXTERNAL_PLUGINS),true)
  600. install_external_plugins:
  601. endif
  602. install: install_main install_external_plugins
  603. # ---------------------------------------------------------------------------------------------------------------------
  604. uninstall:
  605. rm -f $(DESTDIR)$(BINDIR)/carla*
  606. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
  607. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
  608. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  609. rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
  610. rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
  611. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
  612. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
  613. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
  614. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
  615. rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
  616. rm -rf $(DESTDIR)$(LIBDIR)/carla
  617. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  618. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
  619. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
  620. rm -rf $(DESTDIR)$(DATADIR)/carla
  621. rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
  622. # ----------------------------------------------------------------------------------------------------------------------------
  623. ifneq ($(MAKE_TERMOUT),)
  624. ANS_NO=\033[31mNO\033[0m
  625. ANS_YES=\033[32mYES\033[0m
  626. mS=\033[33m[
  627. mZ=\033[30;1m[
  628. mE=]\033[0m
  629. tS=\033[36m
  630. tE=\033[0m
  631. else
  632. ANS_NO=NO
  633. ANS_YES=YES
  634. mS=[
  635. mZ=[
  636. mE=]
  637. endif
  638. features_print_main:
  639. @printf -- "$(tS)---> Main features $(tE)\n"
  640. ifeq ($(HAVE_PYQT),true)
  641. @printf -- "Front-End: $(ANS_YES)\n"
  642. @printf -- "LV2 plugin: $(ANS_YES)\n"
  643. ifneq ($(HAIKU),true)
  644. @printf -- "VST plugin: $(ANS_YES)\n"
  645. else
  646. @printf -- "VST plugin: $(ANS_NO) $(mZ)Not available for Haiku$(mE)\n"
  647. endif
  648. else
  649. @printf -- "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)\n"
  650. @printf -- "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
  651. @printf -- "VST plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
  652. endif
  653. ifeq ($(HAVE_HYLIA),true)
  654. @printf -- "Link support: $(ANS_YES)\n"
  655. else
  656. ifeq ($(MACOS_OLD),true)
  657. @printf -- "Link support: $(ANS_NO) $(mZ)MacOS >= 10.10 only$(mE)\n"
  658. else
  659. @printf -- "Link support: $(ANS_NO) $(mZ)Linux, MacOS and Windows only$(mE)\n"
  660. endif
  661. endif
  662. ifeq ($(HAVE_LIBLO),true)
  663. @printf -- "OSC support: $(ANS_YES)\n"
  664. else
  665. @printf -- "OSC support: $(ANS_NO) $(mS)Missing liblo$(mE)\n"
  666. endif
  667. ifeq ($(WIN32),true)
  668. @printf -- "Binary detect: $(ANS_YES)\n"
  669. else
  670. ifeq ($(HAVE_LIBMAGIC),true)
  671. @printf -- "Binary detect: $(ANS_YES)\n"
  672. else
  673. @printf -- "Binary detect: $(ANS_NO) $(mS)Missing libmagic/file$(mE)\n"
  674. endif
  675. endif
  676. @printf -- "\n"
  677. @printf -- "$(tS)---> Engine drivers $(tE)\n"
  678. @printf -- "JACK: $(ANS_YES)\n"
  679. ifeq ($(LINUX),true)
  680. ifeq ($(HAVE_ALSA),true)
  681. @printf -- "ALSA: $(ANS_YES)\n"
  682. else
  683. @printf -- "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)\n"
  684. endif
  685. else
  686. @printf -- "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)\n"
  687. endif
  688. ifeq ($(UNIX),true)
  689. ifneq ($(MACOS),true)
  690. ifeq ($(HAVE_PULSEAUDIO),true)
  691. @printf -- "PulseAudio: $(ANS_YES)\n"
  692. else
  693. @printf -- "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)\n"
  694. endif
  695. else
  696. @printf -- "PulseAudio: $(ANS_NO) $(mZ)Not available for MacOS$(mE)\n"
  697. endif
  698. else
  699. @printf -- "PulseAudio: $(ANS_NO) $(mZ)Only available for Unix systems$(mE)\n"
  700. endif
  701. ifeq ($(MACOS),true)
  702. @printf -- "CoreAudio: $(ANS_YES)\n"
  703. else
  704. @printf -- "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  705. endif
  706. ifeq ($(WIN32),true)
  707. @printf -- "ASIO: $(ANS_YES)\n"
  708. @printf -- "DirectSound: $(ANS_YES)\n"
  709. @printf -- "WASAPI: $(ANS_YES)\n"
  710. else
  711. @printf -- "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  712. @printf -- "DirectSound: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  713. @printf -- "WASAPI: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  714. endif
  715. @printf -- "\n"
  716. @printf -- "$(tS)---> Plugin formats: $(tE)\n"
  717. @printf -- "Internal: $(ANS_YES)\n"
  718. @printf -- "LADSPA: $(ANS_YES)\n"
  719. @printf -- "DSSI: $(ANS_YES)\n"
  720. @printf -- "LV2: $(ANS_YES)\n"
  721. ifeq ($(MACOS_OR_WIN32),true)
  722. @printf -- "VST: $(ANS_YES) (with UI)\n"
  723. else
  724. ifeq ($(HAIKU),true)
  725. @printf -- "VST: $(ANS_YES) (without UI)\n"
  726. else
  727. ifeq ($(HAVE_X11),true)
  728. @printf -- "VST: $(ANS_YES) (with UI)\n"
  729. else
  730. @printf -- "VST: $(ANS_YES) (without UI) $(mS)Missing X11$(mE)\n"
  731. endif
  732. endif
  733. endif
  734. @printf -- "\n"
  735. @printf -- "$(tS)---> LV2 UI toolkit support: $(tE)\n"
  736. @printf -- "External: $(ANS_YES) (direct)\n"
  737. ifneq ($(MACOS_OR_WIN32),true)
  738. ifeq ($(HAVE_GTK2),true)
  739. @printf -- "Gtk2: $(ANS_YES) (bridge)\n"
  740. else
  741. @printf -- "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)\n"
  742. endif
  743. ifeq ($(HAVE_GTK3),true)
  744. @printf -- "Gtk3: $(ANS_YES) (bridge)\n"
  745. else
  746. @printf -- "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)\n"
  747. endif
  748. ifeq ($(HAVE_QT4),true)
  749. @printf -- "Qt4: $(ANS_YES) (bridge)\n"
  750. else
  751. @printf -- "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)\n"
  752. endif
  753. ifeq ($(HAVE_QT5),true)
  754. @printf -- "Qt5: $(ANS_YES) (bridge)\n"
  755. else
  756. @printf -- "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)\n"
  757. endif
  758. ifeq ($(HAVE_X11),true)
  759. @printf -- "X11: $(ANS_YES) (direct+bridge)\n"
  760. else
  761. @printf -- "X11: $(ANS_NO) $(mS)X11 missing$(mE)\n"
  762. endif
  763. else # LINUX
  764. @printf -- "Gtk2: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  765. @printf -- "Gtk3: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  766. @printf -- "Qt4: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  767. @printf -- "Qt5: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  768. @printf -- "X11: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  769. endif # LINUX
  770. ifeq ($(MACOS),true)
  771. @printf -- "Cocoa: $(ANS_YES) (direct+bridge)\n"
  772. else
  773. @printf -- "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  774. endif
  775. ifeq ($(WIN32),true)
  776. @printf -- "Windows: $(ANS_YES) (direct+bridge)\n"
  777. else
  778. @printf -- "Windows: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  779. endif
  780. @printf -- "\n"
  781. @printf -- "$(tS)---> File formats: $(tE)\n"
  782. ifeq ($(HAVE_SNDFILE),true)
  783. @printf -- "Basic: $(ANS_YES)\n"
  784. else
  785. @printf -- "Basic: $(ANS_NO) $(mS)libsndfile missing$(mE)\n"
  786. endif
  787. ifeq ($(HAVE_FFMPEG),true)
  788. @printf -- "Extra: $(ANS_YES)\n"
  789. else
  790. @printf -- "Extra: $(ANS_NO) $(mS)FFmpeg missing or too new$(mE)\n"
  791. endif
  792. ifeq ($(HAVE_FLUIDSYNTH),true)
  793. @printf -- "SF2/3: $(ANS_YES)\n"
  794. else
  795. @printf -- "SF2/3: $(ANS_NO) $(mS)FluidSynth missing or too old$(mE)\n"
  796. endif
  797. @printf -- "SFZ: $(ANS_YES)\n"
  798. @printf -- "\n"
  799. @printf -- "$(tS)---> Internal plugins: $(tE)\n"
  800. @printf -- "Basic Plugins: $(ANS_YES)\n"
  801. @printf -- "Carla-Patchbay: $(ANS_YES)\n"
  802. @printf -- "Carla-Rack: $(ANS_YES)\n"
  803. ifeq ($(EXTERNAL_PLUGINS),true)
  804. @printf -- "External Plugins: $(ANS_YES)\n"
  805. else
  806. @printf -- "External Plugins: $(ANS_NO)\n"
  807. endif
  808. ifneq ($(EXTERNAL_PLUGINS),true)
  809. features_print_external_plugins:
  810. endif
  811. features: features_print_main features_print_external_plugins
  812. # ---------------------------------------------------------------------------------------------------------------------
  813. .FORCE:
  814. .PHONY: .FORCE
  815. # ---------------------------------------------------------------------------------------------------------------------