Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

958 lines
30KB

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