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