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.

Makefile 29KB

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