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

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