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.

466 lines
13KB

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