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 26KB

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