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