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

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
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
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. #!/usr/bin/make -f
  2. # Makefile for Carla #
  3. # ------------------ #
  4. # Created by falkTX
  5. #
  6. include source/Makefile.mk
  7. # --------------------------------------------------------------
  8. PREFIX = /usr/local
  9. DESTDIR =
  10. SED_PREFIX = $(shell echo $(PREFIX) | sed "s/\//\\\\\\\\\//g")
  11. LINK = ln -sf
  12. PYUIC ?= pyuic4
  13. PYRCC ?= pyrcc4 -py3
  14. # --------------------------------------------------------------
  15. all: CXX RES UI WIDGETS
  16. # --------------------------------------------------------------
  17. # C++ code
  18. CXX: backend bridges discovery
  19. backend:
  20. $(MAKE) -C source/backend
  21. bridges:
  22. $(MAKE) -C source/bridges
  23. discovery:
  24. $(MAKE) -C source/discovery
  25. plugin:
  26. $(MAKE) -C source/plugin
  27. tests:
  28. $(MAKE) -C source/tests
  29. theme:
  30. $(MAKE) -C source/theme
  31. widgets:
  32. $(MAKE) -C source/widgets
  33. posix32:
  34. $(MAKE) -C source/bridges posix32
  35. $(MAKE) -C source/discovery posix32
  36. posix64:
  37. $(MAKE) -C source/bridges posix64
  38. $(MAKE) -C source/discovery posix64
  39. win32:
  40. # $(MAKE) -C source/bridges win32
  41. $(MAKE) -C source/discovery win32
  42. win64:
  43. $(MAKE) -C source/bridges win64
  44. $(MAKE) -C source/discovery win64
  45. wine32:
  46. $(MAKE) -C source/libs jackbridge-win32.dll.so
  47. $(LINK) ../libs/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll
  48. wine64:
  49. $(MAKE) -C source/libs jackbridge-win64.dll.so
  50. $(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll
  51. # --------------------------------------------------------------
  52. # Resources
  53. RES = source/resources_rc.py
  54. RES: $(RES)
  55. source/%_rc.py: resources/%.qrc
  56. $(PYRCC) $< -o $@
  57. # --------------------------------------------------------------
  58. # UI code
  59. UIs = \
  60. source/ui_carla.py \
  61. source/ui_carla_control.py \
  62. source/ui_carla_about.py \
  63. source/ui_carla_database.py \
  64. source/ui_carla_edit.py \
  65. source/ui_carla_parameter.py \
  66. source/ui_carla_plugin.py \
  67. source/ui_carla_refresh.py \
  68. source/ui_carla_settings.py \
  69. source/ui_carla_settings_driver.py \
  70. source/ui_inputdialog_value.py
  71. UI: $(UIs)
  72. source/ui_%.py: resources/ui/%.ui
  73. $(PYUIC) $< -o $@
  74. # --------------------------------------------------------------
  75. # Widgets
  76. WIDGETS = \
  77. source/canvaspreviewframe.py \
  78. source/digitalpeakmeter.py \
  79. source/ledbutton.py \
  80. source/paramspinbox.py \
  81. source/pixmapbutton.py \
  82. source/pixmapdial.py \
  83. source/pixmapkeyboard.py
  84. WIDGETS: $(WIDGETS)
  85. source/%.py: source/widgets/%.py
  86. $(LINK) widgets/$*.py $@
  87. # --------------------------------------------------------------
  88. clean:
  89. $(MAKE) clean -C source/backend
  90. $(MAKE) clean -C source/bridges
  91. $(MAKE) clean -C source/discovery
  92. $(MAKE) clean -C source/libs
  93. $(MAKE) clean -C source/plugin
  94. $(MAKE) clean -C source/tests
  95. $(MAKE) clean -C source/theme
  96. $(MAKE) clean -C source/widgets
  97. rm -f $(RES)
  98. rm -f $(UIs)
  99. rm -f $(WIDGETS)
  100. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  101. # --------------------------------------------------------------
  102. debug:
  103. $(MAKE) DEBUG=true
  104. # --------------------------------------------------------------
  105. install:
  106. # Create directories
  107. install -d $(DESTDIR)$(PREFIX)/bin/
  108. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  109. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  110. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  111. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  112. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  113. install -d $(DESTDIR)$(PREFIX)/lib/dssi/
  114. install -d $(DESTDIR)$(PREFIX)/lib/lv2/
  115. install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  116. install -d $(DESTDIR)$(PREFIX)/lib/vst/
  117. endif
  118. install -d $(DESTDIR)$(PREFIX)/share/applications/
  119. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  120. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  121. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  122. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  123. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  124. install -d $(DESTDIR)$(PREFIX)/share/carla/
  125. # Install script files
  126. install -m 755 \
  127. data/carla \
  128. data/carla-control \
  129. data/carla-single \
  130. $(DESTDIR)$(PREFIX)/bin/
  131. # Install desktop files
  132. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  133. # Install icons, 16x16
  134. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  135. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  136. # Install icons, 48x48
  137. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  138. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  139. # Install icons, 128x128
  140. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  141. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  142. # Install icons, 256x256
  143. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  144. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  145. # Install icons, scalable
  146. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  147. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  148. # Install binaries
  149. install -m 755 \
  150. source/backend/*.so \
  151. source/bridges/carla-bridge-* \
  152. source/discovery/carla-discovery-* \
  153. $(DESTDIR)$(PREFIX)/lib/carla/
  154. # Install python code
  155. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  156. # Install resources
  157. install -m 644 source/backend/resources/nekofilter-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  158. install -m 644 source/backend/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  159. install -m 644 source/backend/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  160. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  161. # # Install plugin
  162. # install -m 644 source/plugin/carla-dssi.so $(DESTDIR)$(PREFIX)/lib/dssi/
  163. # install -m 644 source/plugin/carla-vst.so $(DESTDIR)$(PREFIX)/lib/vst/
  164. # install -m 644 source/plugin/carla.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  165. # endif
  166. # Adjust PREFIX value in script files
  167. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  168. $(DESTDIR)$(PREFIX)/bin/carla \
  169. $(DESTDIR)$(PREFIX)/bin/carla-control \
  170. $(DESTDIR)$(PREFIX)/bin/carla-single
  171. # --------------------------------------------------------------
  172. uninstall:
  173. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  174. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  175. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  176. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  177. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  178. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  179. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  180. rm -f $(DESTDIR)$(PREFIX)/lib/dssi/carla-dssi.so
  181. rm -f $(DESTDIR)$(PREFIX)/lib/vst/carla-vst.so
  182. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  183. rm -rf $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
  184. rm -rf $(DESTDIR)$(PREFIX)/share/carla/
  185. # --------------------------------------------------------------
  186. ANS_NO=\033[31m NO \033[0m
  187. ANS_YES=\033[32m YES \033[0m
  188. mS=\033[33m[
  189. mE=]\033[0m
  190. features:
  191. ifeq ($(MACOS),true)
  192. # --- MacOS ---
  193. @echo "\033[36m---> Engine drivers: (MacOS)\033[0m"
  194. @echo "JACK: $(ANS_YES)"
  195. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  196. @echo "CoreAudio:$(ANS_YES)"
  197. else
  198. @echo "CoreAudio:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  199. endif
  200. # --- MacOS ---
  201. else
  202. # --- Win32 ---
  203. ifeq ($(WIN32),true)
  204. @echo "\033[36m---> Engine drivers: (Windows)\033[0m"
  205. @echo "JACK: $(ANS_YES)"
  206. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  207. @echo "ASIO: $(ANS_YES)"
  208. @echo "DirectSound:$(ANS_YES)"
  209. else
  210. @echo "ASIO: $(ANS_NO) $(mS)RtAudio disabled$(mE)"
  211. @echo "DirectSound:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  212. endif
  213. # --- Win32 ---
  214. else
  215. # --- Others ---
  216. @echo "\033[36m---> Engine drivers: \033[0m"
  217. @echo "JACK: $(ANS_YES)"
  218. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  219. ifeq ($(HAVE_ALSA),true)
  220. @echo "ALSA: $(ANS_YES)"
  221. else
  222. @echo "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)"
  223. endif
  224. ifeq ($(HAVE_PULSEAUDIO),true)
  225. @echo "PulseAudio:$(ANS_YES)"
  226. else
  227. @echo "PulseAudio:$(ANS_NO) $(mS)Missing PulseAudio$(mE)"
  228. endif
  229. else
  230. @echo "ALSA: $(ANS_NO) $(mS)RtAudio disabled$(mE)"
  231. @echo "PulseAudio:$(ANS_NO) $(mS)RtAudio disabled$(mE)"
  232. endif
  233. # --- Others ---
  234. endif
  235. endif
  236. @echo ""
  237. @echo "\033[36m---> Plugin formats: \033[0m"
  238. @echo "Internal:$(ANS_YES)"
  239. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  240. @echo "LADSPA: $(ANS_YES)"
  241. @echo "DSSI: $(ANS_YES)"
  242. @echo "LV2: $(ANS_YES)"
  243. @echo "VST: $(ANS_YES)"
  244. else
  245. @echo "LADSPA: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  246. @echo "DSSI: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  247. @echo "LV2: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  248. @echo "VST: $(ANS_NO) $(mS)Plugins disabled$(mE)"
  249. endif
  250. @echo ""
  251. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  252. @echo "\033[36m---> LV2 UI toolkit support: \033[0m"
  253. @echo "ExternalUI:$(ANS_YES) (direct)"
  254. ifeq ($(MACOS),true)
  255. # --- MacOS ---
  256. @echo "CocoaUI: $(ANS_YES) (direct+bridge)"
  257. # --- MacOS ---
  258. else
  259. # --- Win32 ---
  260. ifeq ($(WIN32),true)
  261. # --- Win32 ---
  262. @echo "WindowsUI: $(ANS_YES) (direct+bridge)"
  263. else
  264. # --- Others ---
  265. ifeq ($(HAVE_GTK2),true)
  266. @echo "GtkUI: $(ANS_YES) (bridge)"
  267. else
  268. @echo "GtkUI: $(ANS_NO) $(mS)Gtk2 missing$(mE)"
  269. endif
  270. ifeq ($(HAVE_GTK3),true)
  271. @echo "Gtk3UI: $(ANS_YES) (bridge)"
  272. else
  273. @echo "Gtk3UI: $(ANS_NO) $(mS)Gtk3 missing$(mE)"
  274. endif
  275. ifeq ($(HAVE_QT4),true)
  276. @echo "Qt4UI: $(ANS_YES) (direct+bridge)"
  277. else
  278. @echo "Qt4UI: $(ANS_NO) $(mS)Qt4 missing$(mE)"
  279. endif
  280. ifeq ($(HAVE_QT5),true)
  281. ifeq ($(HAVE_QT4),true)
  282. @echo "Qt5UI: $(ANS_YES) (bridge)"
  283. else
  284. @echo "Qt5UI: $(ANS_YES) (direct+bridge)"
  285. endif
  286. else
  287. @echo "Qt5UI: $(ANS_NO) $(mS)Qt5 missing$(mE)"
  288. endif
  289. @echo "X11UI: $(ANS_YES) (direct+bridge)"
  290. endif
  291. # --- Others ---
  292. endif
  293. @echo ""
  294. endif
  295. @echo "\033[36m---> Sample formats: \033[0m"
  296. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  297. ifeq ($(HAVE_LINUXSAMPLER),true)
  298. @echo "GIG:$(ANS_YES)"
  299. else
  300. @echo "GIG:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  301. endif
  302. ifeq ($(HAVE_FLUIDSYNTH),true)
  303. @echo "SF2:$(ANS_YES)"
  304. else
  305. @echo "SF2:$(ANS_NO) $(mS)FluidSynth missing$(mE)"
  306. endif
  307. ifeq ($(HAVE_LINUXSAMPLER),true)
  308. @echo "SFZ:$(ANS_YES)"
  309. else
  310. @echo "SFZ:$(ANS_NO) $(mS)LinuxSampler missing$(mE)"
  311. endif
  312. else
  313. @echo "GIG:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  314. @echo "SF2:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  315. @echo "SFZ:$(ANS_NO) $(mS)Samplers disabled$(mE)"
  316. endif
  317. @echo ""
  318. @echo "\033[36m---> Internal plugins: \033[0m"
  319. ifeq ($(HAVE_AF_DEPS),true)
  320. ifeq ($(HAVE_FFMPEG),true)
  321. @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
  322. else
  323. @echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing$(mE)"
  324. endif
  325. else
  326. @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
  327. endif
  328. ifeq ($(HAVE_MF_DEPS),true)
  329. @echo "MidiFile: $(ANS_YES)"
  330. else
  331. @echo "MidiFile: $(ANS_NO) $(mS)libsmf missing$(mE)"
  332. endif
  333. ifeq ($(HAVE_OPENGL),true)
  334. @echo "DISTRHO: $(ANS_YES)"
  335. else
  336. @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"
  337. endif
  338. ifeq ($(HAVE_ZYN_DEPS),true)
  339. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  340. @echo "ZynAddSubFX:$(ANS_YES) (with UI)"
  341. else
  342. @echo "ZynAddSubFX:$(ANS_YES) (without UI) $(mS)NTK missing$(mE)"
  343. endif
  344. else
  345. @echo "ZynAddSubFX:$(ANS_NO) $(mS)fftw-3, mxml or zlib missing$(mE)"
  346. endif