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