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