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

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