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