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