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

11 years ago
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
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
9 years ago
9 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
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
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160
  1. #!/usr/bin/make -f
  2. # Makefile for Carla #
  3. # ------------------ #
  4. # Created by falkTX
  5. #
  6. CWD=source
  7. include source/Makefile.mk
  8. # ---------------------------------------------------------------------------------------------------------------------
  9. PREFIX := /usr/local
  10. BINDIR := $(PREFIX)/bin
  11. LIBDIR := $(PREFIX)/lib
  12. DATADIR := $(PREFIX)/share
  13. INCLUDEDIR := $(PREFIX)/include
  14. DESTDIR :=
  15. ifeq ($(DEBUG),true)
  16. MODULEDIR := $(CURDIR)/build/modules/Debug
  17. else
  18. MODULEDIR := $(CURDIR)/build/modules/Release
  19. endif
  20. # ---------------------------------------------------------------------------------------------------------------------
  21. all: backend discovery bridges-plugin bridges-ui frontend interposer libjack plugin theme
  22. # ---------------------------------------------------------------------------------------------------------------------
  23. # Binaries (native)
  24. ALL_LIBS += $(MODULEDIR)/carla_engine.a
  25. ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a
  26. ALL_LIBS += $(MODULEDIR)/carla_plugin.a
  27. ALL_LIBS += $(MODULEDIR)/jackbridge.a
  28. ALL_LIBS += $(MODULEDIR)/native-plugins.a
  29. ALL_LIBS += $(MODULEDIR)/rtmempool.a
  30. 3RD_LIBS += $(MODULEDIR)/audio_decoder.a
  31. 3RD_LIBS += $(MODULEDIR)/lilv.a
  32. 3RD_LIBS += $(MODULEDIR)/sfzero.a
  33. 3RD_LIBS += $(MODULEDIR)/water.a
  34. 3RD_LIBS += $(MODULEDIR)/zita-resampler.a
  35. ifeq ($(HAVE_DGL),true)
  36. 3RD_LIBS += $(MODULEDIR)/dgl.a
  37. endif
  38. ifeq ($(HAVE_HYLIA),true)
  39. 3RD_LIBS += $(MODULEDIR)/hylia.a
  40. endif
  41. ifeq ($(HAVE_QT4),true)
  42. 3RD_LIBS += $(MODULEDIR)/theme.qt4.a
  43. endif
  44. ifeq ($(HAVE_QT5),true)
  45. 3RD_LIBS += $(MODULEDIR)/theme.qt5.a
  46. endif
  47. ifeq ($(USING_JUCE),true)
  48. 3RD_LIBS += $(MODULEDIR)/juce_audio_basics.a
  49. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  50. 3RD_LIBS += $(MODULEDIR)/juce_audio_devices.a
  51. endif
  52. 3RD_LIBS += $(MODULEDIR)/juce_audio_processors.a
  53. 3RD_LIBS += $(MODULEDIR)/juce_core.a
  54. 3RD_LIBS += $(MODULEDIR)/juce_data_structures.a
  55. 3RD_LIBS += $(MODULEDIR)/juce_events.a
  56. 3RD_LIBS += $(MODULEDIR)/juce_graphics.a
  57. 3RD_LIBS += $(MODULEDIR)/juce_gui_basics.a
  58. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  59. 3RD_LIBS += $(MODULEDIR)/juce_gui_extra.a
  60. endif
  61. endif
  62. ifneq ($(USING_JUCE_AUDIO_DEVICES),true)
  63. 3RD_LIBS += $(MODULEDIR)/rtaudio.a
  64. 3RD_LIBS += $(MODULEDIR)/rtmidi.a
  65. endif
  66. ALL_LIBS += $(3RD_LIBS)
  67. 3rd: $(3RD_LIBS)
  68. @$(MAKE) -C source/theme
  69. ifeq ($(HAVE_QT4),true)
  70. @$(MAKE) -C source/bridges-ui ui_lv2-qt4
  71. endif
  72. libs: $(ALL_LIBS)
  73. $(MODULEDIR)/carla_engine.a: .FORCE
  74. @$(MAKE) -C source/backend/engine
  75. $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a
  76. @$(MAKE) -C source/backend/engine
  77. $(MODULEDIR)/carla_plugin.a: .FORCE
  78. @$(MAKE) -C source/backend/plugin
  79. $(MODULEDIR)/jackbridge.a: .FORCE
  80. @$(MAKE) -C source/jackbridge
  81. $(MODULEDIR)/jackbridge.%.a: .FORCE
  82. @$(MAKE) -C source/jackbridge $*
  83. $(MODULEDIR)/native-plugins.a: .FORCE
  84. @$(MAKE) -C source/native-plugins
  85. $(MODULEDIR)/theme.qt4.a: .FORCE
  86. @$(MAKE) -C source/theme qt4
  87. $(MODULEDIR)/theme.qt5.a: .FORCE
  88. @$(MAKE) -C source/theme qt5
  89. $(MODULEDIR)/%.arm32.a: .FORCE
  90. ifneq ($(WIN32),true)
  91. @$(MAKE) -C source/modules/$* arm32
  92. else
  93. $(error Trying to build ARM binaries with a Windows toolchain, this cannot work)
  94. endif
  95. $(MODULEDIR)/%.posix32.a: .FORCE
  96. ifneq ($(WIN32),true)
  97. @$(MAKE) -C source/modules/$* posix32
  98. else
  99. $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
  100. endif
  101. $(MODULEDIR)/%.posix64.a: .FORCE
  102. ifneq ($(WIN32),true)
  103. @$(MAKE) -C source/modules/$* posix64
  104. else
  105. $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
  106. endif
  107. $(MODULEDIR)/%.win32.a: .FORCE
  108. ifeq ($(WIN32),true)
  109. @$(MAKE) -C source/modules/$* win32
  110. else
  111. $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
  112. endif
  113. $(MODULEDIR)/%.win64.a: .FORCE
  114. ifeq ($(WIN32),true)
  115. @$(MAKE) -C source/modules/$* win64
  116. else
  117. $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
  118. endif
  119. $(MODULEDIR)/dgl.wine.a: .FORCE
  120. @$(MAKE) -C source/modules/dgl wine
  121. $(MODULEDIR)/water.files.a: .FORCE
  122. @$(MAKE) -C source/modules/water files
  123. $(MODULEDIR)/%.a: .FORCE
  124. @$(MAKE) -C source/modules/$*
  125. # ---------------------------------------------------------------------------------------------------------------------
  126. backend: libs
  127. @$(MAKE) -C source/backend
  128. bridges-plugin: libs
  129. @$(MAKE) -C source/bridges-plugin
  130. bridges-ui: libs
  131. @$(MAKE) -C source/bridges-ui
  132. discovery: libs
  133. @$(MAKE) -C source/discovery
  134. frontend: libs
  135. ifeq ($(HAVE_PYQT),true)
  136. @$(MAKE) -C source/frontend
  137. endif
  138. interposer:
  139. ifeq ($(LINUX),true)
  140. @$(MAKE) -C source/interposer
  141. endif
  142. libjack: libs
  143. @$(MAKE) -C source/libjack
  144. lv2-bundles-dep: $(MODULEDIR)/audio_decoder.a $(MODULEDIR)/water.a $(MODULEDIR)/zita-resampler.a
  145. @$(MAKE) -C source/native-plugins bundles
  146. lv2-bundles: lv2-bundles-dep
  147. @$(MAKE) -C source/plugin bundles
  148. plugin: backend bridges-plugin bridges-ui discovery
  149. @$(MAKE) -C source/plugin
  150. ifeq ($(WIN32),true)
  151. plugin-wine:
  152. @$(MAKE) -C source/plugin wine
  153. else
  154. plugin-wine: $(MODULEDIR)/dgl.wine.a
  155. @$(MAKE) -C source/plugin wine
  156. endif
  157. rest: libs
  158. @$(MAKE) -C source/rest
  159. theme: libs
  160. @$(MAKE) -C source/theme
  161. # ---------------------------------------------------------------------------------------------------------------------
  162. # prepare for (re)distribution
  163. _CARLA_QT5_DYLIBS = \
  164. iconengines/libqsvgicon.dylib \
  165. imageformats/libqjpeg.dylib \
  166. imageformats/libqsvg.dylib \
  167. platforms/libqcocoa.dylib \
  168. platforms/libqminimal.dylib \
  169. platforms/libqoffscreen.dylib \
  170. styles/carlastyle.dylib
  171. _CARLA_PLUGIN_UIS = \
  172. carla-plugin \
  173. bigmeter-ui \
  174. midipattern-ui \
  175. notes-ui \
  176. xycontroller-ui
  177. _CARLA_APP_FILES = \
  178. Carla \
  179. carla-bridge-lv2-cocoa \
  180. carla-bridge-lv2.dylib \
  181. carla-bridge-native \
  182. carla-discovery-native \
  183. libcarla_standalone2.dylib \
  184. libcarla_utils.dylib \
  185. styles/carlastyle.json \
  186. $(_CARLA_QT5_DYLIBS) \
  187. $(_CARLA_PLUGIN_UIS:%=resources/%)
  188. CARLA_APP_FILES = $(_CARLA_APP_FILES:%=build/Carla.app/Contents/MacOS/%)
  189. CARLA_QT5_DYLIBS = $(_CARLA_QT5_DYLIBS:%=build/Carla.app/Contents/MacOS/%)
  190. CARLA_PLUGIN_ZIPS = $(_CARLA_PLUGIN_UIS:%=build/%.app/Contents/MacOS/lib/library.zip)
  191. QT5_PREFIX = $(shell pkg-config --variable=prefix Qt5OpenGLExtensions)
  192. dist: carla_mac
  193. carla_mac: $(CARLA_APP_FILES)
  194. build/Carla.app/Contents/MacOS/Carla: build/Carla.app/Contents/MacOS/lib/library.zip $(CARLA_QT5_DYLIBS)
  195. # cleanup
  196. find build/Carla.app/Contents/MacOS/ -type f -name "*.py" -delete
  197. find build/Carla.app/Contents/MacOS/ -type f -name "*.pyi" -delete
  198. find build/Carla.app/Contents/MacOS/ -type f -name "pylupdate.so" -delete
  199. find build/Carla.app/Contents/MacOS/ -type f -name "pyrcc.so" -delete
  200. find build/Carla.app/Contents/MacOS/ -type f -name "QtMacExtras*" -delete
  201. find build/Carla.app/Contents/MacOS/ -type f -name "QtNetwork*" -delete
  202. find build/Carla.app/Contents/MacOS/ -type f -name "QtSql*" -delete
  203. find build/Carla.app/Contents/MacOS/ -type f -name "QtTest*" -delete
  204. find build/Carla.app/Contents/MacOS/ -type f -name "QtXml*" -delete
  205. find build/Carla.app/Contents/MacOS/ -type f -name "*.pyc" -delete
  206. rm -rf build/Carla.app/Contents/MacOS/lib/PyQt5/uic
  207. # adjust binaries
  208. (cd build/Carla.app/Contents/MacOS && \
  209. for f in `find . -type f | grep -e Q -e libq -e carlastyle.dylib`; do \
  210. install_name_tool -change "@rpath/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore $$f && \
  211. install_name_tool -change "@rpath/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui $$f && \
  212. install_name_tool -change "@rpath/QtOpenGL.framework/Versions/5/QtOpenGL" @executable_path/QtOpenGL $$f && \
  213. install_name_tool -change "@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport" @executable_path/QtPrintSupport $$f && \
  214. install_name_tool -change "@rpath/QtSvg.framework/Versions/5/QtSvg" @executable_path/QtSvg $$f && \
  215. install_name_tool -change "@rpath/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets $$f && \
  216. install_name_tool -change "@rpath/QtMacExtras.framework/Versions/5/QtMacExtras" @executable_path/QtMacExtras $$f; \
  217. done)
  218. # symlink resources
  219. mkdir -p build/Carla.app/Contents/MacOS/resources
  220. (cd build/Carla.app/Contents/MacOS/resources && \
  221. ln -sf ../Qt* ../lib ../iconengines ../imageformats ../platforms ../styles . && \
  222. ln -sf carla-plugin carla-plugin-patchbay)
  223. build/Carla.app/Contents/MacOS/lib/library.zip: $(CARLA_PLUGIN_ZIPS) data/macos/bundle.py data/macos/*.plist source/frontend/*
  224. env PYTHONPATH=$(CURDIR)/source/frontend SCRIPT_NAME=Carla python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
  225. # merge all zips into 1
  226. rm -rf build/Carla.app/Contents/MacOS/lib/_lib
  227. mkdir build/Carla.app/Contents/MacOS/lib/_lib
  228. (cd build/Carla.app/Contents/MacOS/lib/_lib && \
  229. mv ../library.zip ../library-main.zip && \
  230. $(_CARLA_PLUGIN_UIS:%=unzip -n $(CURDIR)/build/%.app/Contents/MacOS/lib/library.zip &&) \
  231. unzip -o ../library-main.zip && \
  232. zip -r -9 ../library.zip *)
  233. rm -rf build/Carla.app/Contents/MacOS/lib/_lib
  234. rm -rf build/Carla.app/Contents/MacOS/lib/library-main.zip
  235. build/%.app/Contents/MacOS/lib/library.zip: data/macos/bundle.py data/macos/*.plist source/frontend/*
  236. env PYTHONPATH=$(CURDIR)/source/frontend SCRIPT_NAME=$* python3 ./data/macos/bundle.py bdist_mac --bundle-name=$*
  237. build/Carla.app/Contents/MacOS/iconengines/%: ${QT5_PREFIX}/lib/qt5/plugins/iconengines/%
  238. -@mkdir -p $(shell dirname $@)
  239. @cp -v $< $@
  240. build/Carla.app/Contents/MacOS/imageformats/%: ${QT5_PREFIX}/lib/qt5/plugins/imageformats/%
  241. -@mkdir -p $(shell dirname $@)
  242. @cp -v $< $@
  243. build/Carla.app/Contents/MacOS/platforms/%: ${QT5_PREFIX}/lib/qt5/plugins/platforms/%
  244. -@mkdir -p $(shell dirname $@)
  245. @cp -v $< $@
  246. build/Carla.app/Contents/MacOS/resources/%: build/%.app/Contents/MacOS/lib/library.zip source/frontend/%
  247. -@mkdir -p $(shell dirname $@)
  248. @cp -v build/$*.app/Contents/MacOS/$* $@
  249. build/Carla.app/Contents/MacOS/%: bin/%
  250. -@mkdir -p $(shell dirname $@)
  251. @cp -v $< $@
  252. # ---------------------------------------------------------------------------------------------------------------------
  253. # hacks
  254. msys2fix:
  255. rm -rf source/includes/serd
  256. rm -rf source/includes/sord
  257. rm -rf source/includes/sratom
  258. rm -rf source/includes/lilv
  259. cp -r source/modules/lilv/serd-0.24.0/serd source/includes/serd
  260. cp -r source/modules/lilv/sord-0.16.0/sord source/includes/sord
  261. cp -r source/modules/lilv/sratom-0.6.0/sratom source/includes/sratom
  262. cp -r source/modules/lilv/lilv-0.24.0/lilv source/includes/lilv
  263. # ---------------------------------------------------------------------------------------------------------------------
  264. # nuitka
  265. nuitka: bin/carla bin/carla-rack bin/carla-plugin
  266. bin/carla:
  267. python3 -m nuitka \
  268. -j 4 \
  269. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  270. --follow-imports \
  271. -o ./$@ \
  272. ./source/frontend/carla
  273. bin/carla-rack:
  274. python3 -m nuitka \
  275. -j 8 \
  276. --recurse-all \
  277. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  278. --recurse-not-to=PyQt5 \
  279. --file-reference-choice=runtime \
  280. -o ./$@ \
  281. ./source/frontend/carla
  282. bin/carla-plugin:
  283. python3 -m nuitka \
  284. -j 8 \
  285. --recurse-all \
  286. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  287. --recurse-not-to=PyQt5 \
  288. --file-reference-choice=runtime \
  289. -o ./$@ \
  290. ./source/native-plugins/resources/carla-plugin
  291. # ---------------------------------------------------------------------------------------------------------------------
  292. # Binaries (arm32)
  293. LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
  294. LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
  295. LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
  296. LIBS_ARM32 += $(MODULEDIR)/water.arm32.a
  297. arm32: $(LIBS_ARM32)
  298. $(MAKE) -C source/bridges-plugin arm32
  299. $(MAKE) -C source/discovery arm32
  300. # ---------------------------------------------------------------------------------------------------------------------
  301. # Binaries (posix32)
  302. LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
  303. LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
  304. LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
  305. LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
  306. ifeq ($(USING_JUCE),true)
  307. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_basics.posix32.a
  308. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_processors.posix32.a
  309. LIBS_POSIX32 += $(MODULEDIR)/juce_data_structures.posix32.a
  310. LIBS_POSIX32 += $(MODULEDIR)/juce_core.posix32.a
  311. LIBS_POSIX32 += $(MODULEDIR)/juce_events.posix32.a
  312. LIBS_POSIX32 += $(MODULEDIR)/juce_graphics.posix32.a
  313. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a
  314. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  315. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a
  316. endif
  317. endif
  318. posix32: $(LIBS_POSIX32)
  319. $(MAKE) -C source/bridges-plugin posix32
  320. $(MAKE) -C source/discovery posix32
  321. # ---------------------------------------------------------------------------------------------------------------------
  322. # Binaries (posix64)
  323. LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
  324. LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
  325. LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
  326. LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
  327. ifeq ($(USING_JUCE),true)
  328. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_basics.posix64.a
  329. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_processors.posix64.a
  330. LIBS_POSIX64 += $(MODULEDIR)/juce_data_structures.posix64.a
  331. LIBS_POSIX64 += $(MODULEDIR)/juce_core.posix64.a
  332. LIBS_POSIX64 += $(MODULEDIR)/juce_events.posix64.a
  333. LIBS_POSIX64 += $(MODULEDIR)/juce_graphics.posix64.a
  334. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a
  335. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  336. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a
  337. endif
  338. endif
  339. posix64: $(LIBS_POSIX64)
  340. $(MAKE) -C source/bridges-plugin posix64
  341. $(MAKE) -C source/discovery posix64
  342. # ---------------------------------------------------------------------------------------------------------------------
  343. # Binaries (win32)
  344. ifeq ($(BUILDING_FOR_WINDOWS),true)
  345. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32.a
  346. else
  347. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32e.a
  348. endif
  349. LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
  350. LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
  351. LIBS_WIN32 += $(MODULEDIR)/water.win32.a
  352. ifeq ($(USING_JUCE),true)
  353. LIBS_WIN32 += $(MODULEDIR)/juce_audio_basics.win32.a
  354. LIBS_WIN32 += $(MODULEDIR)/juce_audio_processors.win32.a
  355. LIBS_WIN32 += $(MODULEDIR)/juce_data_structures.win32.a
  356. LIBS_WIN32 += $(MODULEDIR)/juce_core.win32.a
  357. LIBS_WIN32 += $(MODULEDIR)/juce_events.win32.a
  358. LIBS_WIN32 += $(MODULEDIR)/juce_graphics.win32.a
  359. LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a
  360. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  361. LIBS_WIN32 += $(MODULEDIR)/juce_gui_extra.win32.a
  362. endif
  363. endif
  364. win32r: $(LIBS_WIN32)
  365. $(MAKE) -C source/bridges-plugin win32
  366. $(MAKE) -C source/discovery win32
  367. win32: $(LIBS_WIN32)
  368. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win32
  369. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win32
  370. # ---------------------------------------------------------------------------------------------------------------------
  371. # Binaries (win64)
  372. ifeq ($(BUILDING_FOR_WINDOWS),true)
  373. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64.a
  374. else
  375. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64e.a
  376. endif
  377. LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
  378. LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
  379. LIBS_WIN64 += $(MODULEDIR)/water.win64.a
  380. ifeq ($(USING_JUCE),true)
  381. LIBS_WIN64 += $(MODULEDIR)/juce_audio_basics.win64.a
  382. LIBS_WIN64 += $(MODULEDIR)/juce_audio_processors.win64.a
  383. LIBS_WIN64 += $(MODULEDIR)/juce_data_structures.win64.a
  384. LIBS_WIN64 += $(MODULEDIR)/juce_core.win64.a
  385. LIBS_WIN64 += $(MODULEDIR)/juce_events.win64.a
  386. LIBS_WIN64 += $(MODULEDIR)/juce_graphics.win64.a
  387. LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
  388. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  389. LIBS_WIN64 += $(MODULEDIR)/juce_gui_extra.win64.a
  390. endif
  391. endif
  392. win64r: $(LIBS_WIN64)
  393. $(MAKE) -C source/bridges-plugin win64
  394. $(MAKE) -C source/discovery win64
  395. win64: $(LIBS_WIN64)
  396. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
  397. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
  398. # ---------------------------------------------------------------------------------------------------------------------
  399. # Binaries (wine)
  400. wine32:
  401. $(MAKE) -C source/jackbridge wine32
  402. cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(CURDIR)/bin/jackbridge-wine32.dll
  403. wine64:
  404. $(MAKE) -C source/jackbridge wine64
  405. cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll
  406. # ---------------------------------------------------------------------------------------------------------------------
  407. clean:
  408. $(MAKE) clean -C source/backend
  409. $(MAKE) clean -C source/bridges-plugin
  410. $(MAKE) clean -C source/bridges-ui
  411. $(MAKE) clean -C source/discovery
  412. $(MAKE) clean -C source/frontend
  413. $(MAKE) clean -C source/interposer
  414. $(MAKE) clean -C source/libjack
  415. $(MAKE) clean -C source/modules
  416. $(MAKE) clean -C source/native-plugins
  417. $(MAKE) clean -C source/plugin
  418. $(MAKE) clean -C source/tests
  419. $(MAKE) clean -C source/theme
  420. rm -f *~ source/*~
  421. distclean: clean
  422. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  423. rm -rf build build-lv2
  424. cpp:
  425. $(MAKE) CPPMODE=true
  426. debug:
  427. $(MAKE) DEBUG=true
  428. doxygen:
  429. $(MAKE) doxygen -C source/backend
  430. tests:
  431. $(MAKE) -C source/tests
  432. stoat:
  433. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  434. # stoat --recursive ./build/ \
  435. # --suppression ./data/stoat-supression.txt \
  436. # --whitelist ./data/stoat-whitelist.txt \
  437. # --graph-view ./data/stoat-callgraph.png
  438. # ---------------------------------------------------------------------------------------------------------------------
  439. install_main:
  440. # Create directories
  441. install -d $(DESTDIR)$(BINDIR)
  442. ifeq ($(LINUX),true)
  443. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  444. else
  445. install -d $(DESTDIR)$(LIBDIR)/carla
  446. endif
  447. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  448. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  449. ifeq ($(LINUX),true)
  450. ifeq ($(HAVE_JACK),true)
  451. ifeq ($(JACKBRIDGE_DIRECT),true)
  452. install -d $(DESTDIR)$(JACK_LIBDIR)
  453. endif
  454. endif
  455. endif
  456. ifeq ($(HAVE_PYQT),true)
  457. # Create directories (gui)
  458. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  459. install -d $(DESTDIR)$(DATADIR)/applications
  460. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  461. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  462. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  463. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  464. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  465. install -d $(DESTDIR)$(DATADIR)/mime/packages
  466. install -d $(DESTDIR)$(DATADIR)/carla/resources
  467. install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
  468. install -d $(DESTDIR)$(DATADIR)/carla/modgui
  469. install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
  470. install -d $(DESTDIR)$(DATADIR)/carla/widgets
  471. endif
  472. # -------------------------------------------------------------------------------------------------------------
  473. # Install script files (non-gui)
  474. install -m 755 \
  475. data/carla-single \
  476. $(DESTDIR)$(BINDIR)
  477. # Adjust PREFIX value in script files (non-gui)
  478. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  479. $(DESTDIR)$(BINDIR)/carla-single
  480. # Install backend libs
  481. install -m 644 \
  482. bin/libcarla_*.* \
  483. $(DESTDIR)$(LIBDIR)/carla
  484. # Install other binaries
  485. install -m 755 \
  486. bin/*bridge-* \
  487. bin/carla-discovery-* \
  488. $(DESTDIR)$(LIBDIR)/carla
  489. ifeq ($(LINUX),true)
  490. ifeq ($(HAVE_JACK),true)
  491. ifeq ($(JACKBRIDGE_DIRECT),true)
  492. # Install internal jack client
  493. ln -sf \
  494. $(LIBDIR)/carla/libcarla_standalone2.so \
  495. $(DESTDIR)$(JACK_LIBDIR)/carla.so
  496. endif
  497. endif
  498. ifneq ($(JACKBRIDGE_DIRECT),true)
  499. # Install custom libjack
  500. install -m 755 \
  501. bin/jack/libjack.so.0 \
  502. $(DESTDIR)$(LIBDIR)/carla/jack
  503. endif
  504. endif
  505. # Install pkg-config files
  506. install -m 644 \
  507. data/*.pc \
  508. $(DESTDIR)$(LIBDIR)/pkgconfig
  509. # Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files
  510. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  511. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  512. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  513. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  514. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  515. sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
  516. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  517. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  518. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  519. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  520. sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  521. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  522. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  523. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  524. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  525. # Install headers
  526. install -m 644 \
  527. source/backend/CarlaBackend.h \
  528. source/backend/CarlaHost.h \
  529. source/backend/CarlaUtils.h \
  530. source/backend/CarlaEngine.hpp \
  531. source/backend/CarlaPlugin.hpp \
  532. source/includes/CarlaNative.h \
  533. $(DESTDIR)$(INCLUDEDIR)/carla
  534. install -m 644 \
  535. source/includes/CarlaDefines.h \
  536. source/includes/CarlaMIDI.h \
  537. source/includes/CarlaNative.h \
  538. source/includes/CarlaNativePlugin.h \
  539. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  540. # -------------------------------------------------------------------------------------------------------------
  541. ifeq ($(HAVE_PYQT),true)
  542. ifneq ($(CPPMODE),true)
  543. # Install script files (gui)
  544. install -m 755 \
  545. data/carla \
  546. data/carla-database \
  547. data/carla-jack-multi \
  548. data/carla-jack-single \
  549. data/carla-jack-patchbayplugin \
  550. data/carla-osc-gui \
  551. data/carla-patchbay \
  552. data/carla-rack \
  553. data/carla-settings \
  554. $(DESTDIR)$(BINDIR)
  555. # Adjust PREFIX value in script files (gui)
  556. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  557. $(DESTDIR)$(BINDIR)/carla \
  558. $(DESTDIR)$(BINDIR)/carla-database \
  559. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  560. $(DESTDIR)$(BINDIR)/carla-jack-single \
  561. $(DESTDIR)$(BINDIR)/carla-jack-patchbayplugin \
  562. $(DESTDIR)$(BINDIR)/carla-osc-gui \
  563. $(DESTDIR)$(BINDIR)/carla-patchbay \
  564. $(DESTDIR)$(BINDIR)/carla-rack \
  565. $(DESTDIR)$(BINDIR)/carla-settings
  566. ifeq ($(HAVE_LIBLO),true)
  567. install -m 755 \
  568. data/carla-control \
  569. $(DESTDIR)$(BINDIR)
  570. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  571. $(DESTDIR)$(BINDIR)/carla-control
  572. endif
  573. # Install the real modgui bridge
  574. install -m 755 \
  575. data/carla-bridge-lv2-modgui \
  576. $(DESTDIR)$(LIBDIR)/carla
  577. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  578. $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  579. # Install frontend
  580. install -m 644 \
  581. source/frontend/carla \
  582. source/frontend/carla-control \
  583. source/frontend/carla-jack-multi \
  584. source/frontend/carla-jack-single \
  585. source/frontend/carla-patchbay \
  586. source/frontend/carla-rack \
  587. source/frontend/*.py \
  588. $(DESTDIR)$(DATADIR)/carla/
  589. install -m 644 \
  590. source/frontend/modgui/*.py \
  591. $(DESTDIR)$(DATADIR)/carla/modgui/
  592. install -m 644 \
  593. source/frontend/patchcanvas/*.py \
  594. $(DESTDIR)$(DATADIR)/carla/patchcanvas/
  595. install -m 644 \
  596. source/frontend/widgets/*.py \
  597. $(DESTDIR)$(DATADIR)/carla/widgets/
  598. # Adjust LIBDIR and DATADIR value in python code
  599. sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  600. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  601. sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  602. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  603. # Install resources (gui)
  604. install -m 755 \
  605. bin/resources/carla-plugin \
  606. bin/resources/carla-plugin-patchbay \
  607. bin/resources/*-ui \
  608. $(DESTDIR)$(DATADIR)/carla/resources
  609. endif # CPPMODE
  610. ifeq ($(HAVE_THEME),true)
  611. # Install theme
  612. install -m 644 \
  613. bin/styles/* \
  614. $(DESTDIR)$(LIBDIR)/carla/styles
  615. endif
  616. # Install desktop files
  617. install -m 644 data/desktop/carla.desktop $(DESTDIR)$(DATADIR)/applications
  618. install -m 644 data/desktop/carla-rack.desktop $(DESTDIR)$(DATADIR)/applications
  619. install -m 644 data/desktop/carla-patchbay.desktop $(DESTDIR)$(DATADIR)/applications
  620. install -m 644 data/desktop/carla-jack-single.desktop $(DESTDIR)$(DATADIR)/applications
  621. install -m 644 data/desktop/carla-jack-multi.desktop $(DESTDIR)$(DATADIR)/applications
  622. ifeq ($(HAVE_LIBLO),true)
  623. install -m 644 data/desktop/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  624. endif
  625. # Install mime package
  626. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  627. # Install icons, 16x16
  628. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  629. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  630. # Install icons, 48x48
  631. install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  632. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  633. # Install icons, 128x128
  634. install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  635. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  636. # Install icons, 256x256
  637. install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  638. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  639. # Install icons, scalable
  640. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  641. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  642. # Install resources (re-use python files)
  643. $(LINK) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
  644. $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
  645. $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
  646. $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  647. $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  648. $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  649. $(LINK) ../carla_control.py $(DESTDIR)$(DATADIR)/carla/resources
  650. $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  651. $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  652. $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  653. $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  654. $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  655. $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  656. $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  657. $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  658. $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  659. $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  660. $(LINK) ../ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources
  661. $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  662. $(LINK) ../ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  663. $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  664. $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  665. $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  666. $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  667. $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  668. $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  669. $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  670. $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  671. $(LINK) ../ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  672. $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  673. $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  674. $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  675. $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  676. # Install translations
  677. $(foreach l,$(I18N_LANGUAGES),install -m 644 \
  678. source/frontend/translations/carla_$(l).qm \
  679. $(DESTDIR)$(DATADIR)/carla/resources/translations/;)
  680. endif # HAVE_PYQT
  681. # -------------------------------------------------------------------------------------------------------------
  682. # Install lv2 plugin
  683. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  684. install -m 644 \
  685. bin/carla.lv2/carla.* \
  686. bin/carla.lv2/*.ttl \
  687. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  688. # Link binaries for lv2 plugin
  689. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  690. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  691. done
  692. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  693. ifeq ($(LINUX),true)
  694. # Link jack app bridge
  695. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  696. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  697. endif
  698. ifeq ($(HAVE_PYQT),true)
  699. # Link resources for lv2 plugin
  700. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  701. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  702. # Link styles for lv2 plugin
  703. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  704. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  705. endif
  706. # -------------------------------------------------------------------------------------------------------------
  707. ifneq ($(HAIKU),true)
  708. ifeq ($(HAVE_PYQT),true)
  709. # Install vst plugin
  710. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  711. install -m 644 \
  712. bin/CarlaRack*.* \
  713. bin/CarlaPatchbay*.* \
  714. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  715. # Link binaries for vst plugin
  716. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  717. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  718. done
  719. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  720. # Link jack app bridge
  721. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  722. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  723. # Link resources for vst plugin
  724. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  725. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  726. # Link styles for vst plugin
  727. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  728. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  729. endif
  730. endif
  731. # -------------------------------------------------------------------------------------------------------------
  732. ifneq ($(HAVE_PYQT),true)
  733. # Remove gui files for non-gui build
  734. rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  735. rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
  736. endif
  737. # ---------------------------------------------------------------------------------------------------------------------
  738. ifneq ($(EXTERNAL_PLUGINS),true)
  739. install_external_plugins:
  740. endif
  741. install: install_main install_external_plugins
  742. # ---------------------------------------------------------------------------------------------------------------------
  743. uninstall:
  744. rm -f $(DESTDIR)$(BINDIR)/carla*
  745. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc
  746. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
  747. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
  748. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  749. rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
  750. rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
  751. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
  752. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
  753. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
  754. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
  755. rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
  756. rm -rf $(DESTDIR)$(LIBDIR)/carla
  757. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  758. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
  759. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
  760. rm -rf $(DESTDIR)$(DATADIR)/carla
  761. rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
  762. # ----------------------------------------------------------------------------------------------------------------------------
  763. ifneq ($(MAKE_TERMOUT),)
  764. ANS_NO=\033[31mNO\033[0m
  765. ANS_YES=\033[32mYES\033[0m
  766. mS=\033[33m[
  767. mZ=\033[30;1m[
  768. mE=]\033[0m
  769. tS=\033[36m
  770. tE=\033[0m
  771. else
  772. ANS_NO=NO
  773. ANS_YES=YES
  774. mS=[
  775. mZ=[
  776. mE=]
  777. endif
  778. features_print_main:
  779. @printf -- "$(tS)---> Main features $(tE)\n"
  780. ifeq ($(HAVE_PYQT),true)
  781. @printf -- "Front-End: $(ANS_YES)\n"
  782. @printf -- "LV2 plugin: $(ANS_YES)\n"
  783. ifneq ($(HAIKU),true)
  784. @printf -- "VST2 plugin: $(ANS_YES)\n"
  785. else
  786. @printf -- "VST2 plugin: $(ANS_NO) $(mZ)Not available for Haiku$(mE)\n"
  787. endif
  788. else
  789. @printf -- "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)\n"
  790. @printf -- "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
  791. @printf -- "VST2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
  792. endif
  793. ifeq ($(HAVE_HYLIA),true)
  794. @printf -- "Link support: $(ANS_YES)\n"
  795. else
  796. ifeq ($(MACOS_OLD),true)
  797. @printf -- "Link support: $(ANS_NO) $(mZ)MacOS >= 10.8 only$(mE)\n"
  798. else
  799. @printf -- "Link support: $(ANS_NO) $(mZ)Linux, MacOS and Windows only$(mE)\n"
  800. endif
  801. endif
  802. ifeq ($(HAVE_LIBLO),true)
  803. @printf -- "OSC support: $(ANS_YES)\n"
  804. else
  805. @printf -- "OSC support: $(ANS_NO) $(mS)Missing liblo$(mE)\n"
  806. endif
  807. ifeq ($(WIN32),true)
  808. @printf -- "Binary detect: $(ANS_YES)\n"
  809. else
  810. ifeq ($(HAVE_LIBMAGIC),true)
  811. @printf -- "Binary detect: $(ANS_YES)\n"
  812. else
  813. @printf -- "Binary detect: $(ANS_NO) $(mS)Missing libmagic/file$(mE)\n"
  814. endif
  815. endif
  816. @printf -- "\n"
  817. @printf -- "$(tS)---> Engine drivers $(tE)\n"
  818. @printf -- "JACK: $(ANS_YES)\n"
  819. ifeq ($(LINUX),true)
  820. ifeq ($(HAVE_ALSA),true)
  821. @printf -- "ALSA: $(ANS_YES)\n"
  822. else
  823. @printf -- "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)\n"
  824. endif
  825. else
  826. @printf -- "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)\n"
  827. endif
  828. ifeq ($(UNIX),true)
  829. ifneq ($(MACOS),true)
  830. ifeq ($(HAVE_PULSEAUDIO),true)
  831. @printf -- "PulseAudio: $(ANS_YES)\n"
  832. else
  833. @printf -- "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)\n"
  834. endif
  835. else
  836. @printf -- "PulseAudio: $(ANS_NO) $(mZ)Not available for MacOS$(mE)\n"
  837. endif
  838. else
  839. @printf -- "PulseAudio: $(ANS_NO) $(mZ)Only available for Unix systems$(mE)\n"
  840. endif
  841. ifeq ($(MACOS),true)
  842. @printf -- "CoreAudio: $(ANS_YES)\n"
  843. else
  844. @printf -- "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  845. endif
  846. ifeq ($(WIN32),true)
  847. @printf -- "ASIO: $(ANS_YES)\n"
  848. @printf -- "DirectSound: $(ANS_YES)\n"
  849. @printf -- "WASAPI: $(ANS_YES)\n"
  850. else
  851. @printf -- "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  852. @printf -- "DirectSound: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  853. @printf -- "WASAPI: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  854. endif
  855. @printf -- "\n"
  856. @printf -- "$(tS)---> Plugin formats: $(tE)\n"
  857. @printf -- "Internal: $(ANS_YES)\n"
  858. @printf -- "LADSPA: $(ANS_YES)\n"
  859. @printf -- "DSSI: $(ANS_YES)\n"
  860. @printf -- "LV2: $(ANS_YES)\n"
  861. ifeq ($(MACOS_OR_WIN32),true)
  862. ifeq ($(USING_JUCE),true)
  863. @printf -- "VST2: $(ANS_YES) (with UI, using JUCE)\n"
  864. @printf -- "VST3: $(ANS_YES) (with UI, using JUCE)\n"
  865. else # USING_JUCE
  866. @printf -- "VST2: $(ANS_YES) (with UI)\n"
  867. @printf -- "VST3: $(ANS_NO)\n"
  868. endif # USING_JUCE
  869. else # MACOS_OR_WIN32
  870. ifeq ($(HAIKU),true)
  871. @printf -- "VST2: $(ANS_YES) (without UI)\n"
  872. @printf -- "VST3: $(ANS_NO)\n"
  873. else # HAIKU
  874. ifeq ($(HAVE_X11),true)
  875. @printf -- "VST2: $(ANS_YES) (with UI)\n"
  876. ifeq ($(USING_JUCE),true)
  877. @printf -- "VST3: $(ANS_YES) (with UI, using JUCE)\n"
  878. else # USING_JUCE
  879. @printf -- "VST3: $(ANS_NO)\n"
  880. endif # USING_JUCE
  881. else # HAVE_X11
  882. @printf -- "VST2: $(ANS_YES) (without UI) $(mS)Missing X11$(mE)\n"
  883. @printf -- "VST3: $(ANS_NO)\n"
  884. endif # HAVE_X11
  885. endif # HAIKU
  886. endif # MACOS_OR_WIN32
  887. ifeq ($(MACOS),true)
  888. ifeq ($(USING_JUCE),true)
  889. @printf -- "AU: $(ANS_YES) (with UI, using JUCE)\n"
  890. else # USING_JUCE
  891. @printf -- "AU: $(ANS_NO)\n"
  892. endif # USING_JUCE
  893. else # MACOS
  894. @printf -- "AU: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  895. endif # MACOS
  896. @printf -- "\n"
  897. @printf -- "$(tS)---> LV2 UI toolkit support: $(tE)\n"
  898. @printf -- "External: $(ANS_YES) (direct)\n"
  899. ifneq ($(MACOS_OR_WIN32),true)
  900. ifeq ($(HAVE_GTK2),true)
  901. @printf -- "Gtk2: $(ANS_YES) (bridge)\n"
  902. else
  903. @printf -- "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)\n"
  904. endif
  905. ifeq ($(HAVE_GTK3),true)
  906. @printf -- "Gtk3: $(ANS_YES) (bridge)\n"
  907. else
  908. @printf -- "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)\n"
  909. endif
  910. ifeq ($(HAVE_QT4),true)
  911. @printf -- "Qt4: $(ANS_YES) (bridge)\n"
  912. else
  913. @printf -- "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)\n"
  914. endif
  915. ifeq ($(HAVE_QT5),true)
  916. @printf -- "Qt5: $(ANS_YES) (bridge)\n"
  917. else
  918. @printf -- "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)\n"
  919. endif
  920. ifeq ($(HAVE_X11),true)
  921. @printf -- "X11: $(ANS_YES) (direct+bridge)\n"
  922. else
  923. @printf -- "X11: $(ANS_NO) $(mS)X11 missing$(mE)\n"
  924. endif
  925. else # LINUX
  926. @printf -- "Gtk2: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  927. @printf -- "Gtk3: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  928. @printf -- "Qt4: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  929. @printf -- "Qt5: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  930. @printf -- "X11: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  931. endif # LINUX
  932. ifeq ($(MACOS),true)
  933. @printf -- "Cocoa: $(ANS_YES) (direct+bridge)\n"
  934. else
  935. @printf -- "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  936. endif
  937. ifeq ($(WIN32),true)
  938. @printf -- "Windows: $(ANS_YES) (direct+bridge)\n"
  939. else
  940. @printf -- "Windows: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  941. endif
  942. @printf -- "\n"
  943. @printf -- "$(tS)---> File formats: $(tE)\n"
  944. ifeq ($(HAVE_SNDFILE),true)
  945. @printf -- "Basic: $(ANS_YES)\n"
  946. else
  947. @printf -- "Basic: $(ANS_NO) $(mS)libsndfile missing$(mE)\n"
  948. endif
  949. ifeq ($(HAVE_FFMPEG),true)
  950. @printf -- "Extra: $(ANS_YES)\n"
  951. else
  952. @printf -- "Extra: $(ANS_NO) $(mS)FFmpeg missing or too new$(mE)\n"
  953. endif
  954. # ifeq ($(HAVE_FLUIDSYNTH_INSTPATCH),true)
  955. # @printf -- "DLS: $(ANS_YES)\n"
  956. # else
  957. # @printf -- "DLS: $(ANS_NO) $(mS)FluidSynth/instpatch missing or too old$(mE)\n"
  958. # endif
  959. ifeq ($(HAVE_FLUIDSYNTH),true)
  960. @printf -- "SF2/3: $(ANS_YES)\n"
  961. else
  962. @printf -- "SF2/3: $(ANS_NO) $(mS)FluidSynth missing or too old$(mE)\n"
  963. endif
  964. @printf -- "SFZ: $(ANS_YES)\n"
  965. @printf -- "\n"
  966. @printf -- "$(tS)---> Internal plugins: $(tE)\n"
  967. @printf -- "Basic Plugins: $(ANS_YES)\n"
  968. @printf -- "Carla-Patchbay: $(ANS_YES)\n"
  969. @printf -- "Carla-Rack: $(ANS_YES)\n"
  970. ifeq ($(EXTERNAL_PLUGINS),true)
  971. @printf -- "External Plugins: $(ANS_YES)\n"
  972. else
  973. @printf -- "External Plugins: $(ANS_NO)\n"
  974. endif
  975. ifneq ($(EXTERNAL_PLUGINS),true)
  976. features_print_external_plugins:
  977. endif
  978. features: features_print_main features_print_external_plugins
  979. # ---------------------------------------------------------------------------------------------------------------------
  980. .FORCE:
  981. .PHONY: .FORCE
  982. # ---------------------------------------------------------------------------------------------------------------------