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

11 years ago
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
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
6 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  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. ifeq ($(HAVE_DGL),true)
  35. 3RD_LIBS += $(MODULEDIR)/dgl.a
  36. endif
  37. ifeq ($(HAVE_HYLIA),true)
  38. 3RD_LIBS += $(MODULEDIR)/hylia.a
  39. endif
  40. ifeq ($(HAVE_QT4),true)
  41. 3RD_LIBS += $(MODULEDIR)/theme.qt4.a
  42. endif
  43. ifeq ($(HAVE_QT5),true)
  44. 3RD_LIBS += $(MODULEDIR)/theme.qt5.a
  45. endif
  46. ifeq ($(USING_JUCE),true)
  47. 3RD_LIBS += $(MODULEDIR)/juce_audio_basics.a
  48. 3RD_LIBS += $(MODULEDIR)/juce_audio_devices.a
  49. 3RD_LIBS += $(MODULEDIR)/juce_audio_processors.a
  50. 3RD_LIBS += $(MODULEDIR)/juce_core.a
  51. 3RD_LIBS += $(MODULEDIR)/juce_data_structures.a
  52. 3RD_LIBS += $(MODULEDIR)/juce_events.a
  53. 3RD_LIBS += $(MODULEDIR)/juce_graphics.a
  54. 3RD_LIBS += $(MODULEDIR)/juce_gui_basics.a
  55. ifeq ($(MACOS),true)
  56. 3RD_LIBS += $(MODULEDIR)/juce_gui_extra.a
  57. endif
  58. else
  59. 3RD_LIBS += $(MODULEDIR)/rtaudio.a
  60. 3RD_LIBS += $(MODULEDIR)/rtmidi.a
  61. endif
  62. ALL_LIBS += $(3RD_LIBS)
  63. 3rd: $(3RD_LIBS)
  64. @$(MAKE) -C source/theme
  65. libs: $(ALL_LIBS)
  66. $(MODULEDIR)/carla_engine.a: .FORCE
  67. @$(MAKE) -C source/backend/engine
  68. $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a
  69. @$(MAKE) -C source/backend/engine
  70. $(MODULEDIR)/carla_plugin.a: .FORCE
  71. @$(MAKE) -C source/backend/plugin
  72. $(MODULEDIR)/jackbridge.a: .FORCE
  73. @$(MAKE) -C source/jackbridge
  74. $(MODULEDIR)/jackbridge.%.a: .FORCE
  75. @$(MAKE) -C source/jackbridge $*
  76. $(MODULEDIR)/native-plugins.a: .FORCE
  77. @$(MAKE) -C source/native-plugins
  78. $(MODULEDIR)/theme.qt4.a: .FORCE
  79. @$(MAKE) -C source/theme qt4
  80. $(MODULEDIR)/theme.qt5.a: .FORCE
  81. @$(MAKE) -C source/theme qt5
  82. $(MODULEDIR)/%.arm32.a: .FORCE
  83. ifneq ($(WIN32),true)
  84. @$(MAKE) -C source/modules/$* arm32
  85. else
  86. $(error Trying to build ARM binaries with a Windows toolchain, this cannot work)
  87. endif
  88. $(MODULEDIR)/%.posix32.a: .FORCE
  89. ifneq ($(WIN32),true)
  90. @$(MAKE) -C source/modules/$* posix32
  91. else
  92. $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
  93. endif
  94. $(MODULEDIR)/%.posix64.a: .FORCE
  95. ifneq ($(WIN32),true)
  96. @$(MAKE) -C source/modules/$* posix64
  97. else
  98. $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
  99. endif
  100. $(MODULEDIR)/%.win32.a: .FORCE
  101. ifeq ($(WIN32),true)
  102. @$(MAKE) -C source/modules/$* win32
  103. else
  104. $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
  105. endif
  106. $(MODULEDIR)/%.win64.a: .FORCE
  107. ifeq ($(WIN32),true)
  108. @$(MAKE) -C source/modules/$* win64
  109. else
  110. $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
  111. endif
  112. $(MODULEDIR)/dgl.wine.a: .FORCE
  113. @$(MAKE) -C source/modules/dgl wine
  114. $(MODULEDIR)/%.a: .FORCE
  115. @$(MAKE) -C source/modules/$*
  116. # ---------------------------------------------------------------------------------------------------------------------
  117. backend: libs
  118. @$(MAKE) -C source/backend
  119. bridges-plugin: libs
  120. @$(MAKE) -C source/bridges-plugin
  121. bridges-ui: libs
  122. @$(MAKE) -C source/bridges-ui
  123. discovery: libs
  124. @$(MAKE) -C source/discovery
  125. frontend:
  126. ifeq ($(HAVE_PYQT),true)
  127. @$(MAKE) -C source/frontend
  128. endif
  129. interposer:
  130. ifeq ($(LINUX),true)
  131. @$(MAKE) -C source/interposer
  132. endif
  133. libjack: libs
  134. @$(MAKE) -C source/libjack
  135. plugin: backend bridges-plugin bridges-ui discovery
  136. @$(MAKE) -C source/plugin
  137. ifeq ($(WIN32),true)
  138. plugin-wine:
  139. @$(MAKE) -C source/plugin wine
  140. else
  141. plugin-wine: $(MODULEDIR)/dgl.wine.a
  142. @$(MAKE) -C source/plugin wine
  143. endif
  144. rest: libs
  145. @$(MAKE) -C source/rest
  146. theme: libs
  147. @$(MAKE) -C source/theme
  148. # ---------------------------------------------------------------------------------------------------------------------
  149. # nuitka
  150. nuitka: bin/carla bin/carla-rack bin/carla-plugin
  151. bin/carla:
  152. python3 -m nuitka \
  153. -j 8 \
  154. --recurse-all \
  155. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  156. --recurse-not-to=PyQt5 \
  157. --file-reference-choice=runtime \
  158. -o ./$@ \
  159. ./source/frontend/carla
  160. bin/carla-rack:
  161. python3 -m nuitka \
  162. -j 8 \
  163. --recurse-all \
  164. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  165. --recurse-not-to=PyQt5 \
  166. --file-reference-choice=runtime \
  167. -o ./$@ \
  168. ./source/frontend/carla
  169. bin/carla-plugin:
  170. python3 -m nuitka \
  171. -j 8 \
  172. --recurse-all \
  173. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  174. --recurse-not-to=PyQt5 \
  175. --file-reference-choice=runtime \
  176. -o ./$@ \
  177. ./source/native-plugins/resources/carla-plugin
  178. # ---------------------------------------------------------------------------------------------------------------------
  179. # Binaries (arm32)
  180. LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
  181. LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
  182. LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
  183. LIBS_ARM32 += $(MODULEDIR)/water.arm32.a
  184. arm32: $(LIBS_ARM32)
  185. $(MAKE) -C source/bridges-plugin arm32
  186. $(MAKE) -C source/discovery arm32
  187. # ---------------------------------------------------------------------------------------------------------------------
  188. # Binaries (posix32)
  189. LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
  190. LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
  191. LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
  192. LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
  193. ifeq ($(USING_JUCE),true)
  194. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_basics.posix32.a
  195. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_processors.posix32.a
  196. LIBS_POSIX32 += $(MODULEDIR)/juce_data_structures.posix32.a
  197. LIBS_POSIX32 += $(MODULEDIR)/juce_core.posix32.a
  198. LIBS_POSIX32 += $(MODULEDIR)/juce_events.posix32.a
  199. ifeq ($(MACOS_OR_WIN32),true)
  200. LIBS_POSIX32 += $(MODULEDIR)/juce_graphics.posix32.a
  201. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a
  202. endif
  203. endif
  204. posix32: $(LIBS_POSIX32)
  205. $(MAKE) -C source/bridges-plugin posix32
  206. $(MAKE) -C source/discovery posix32
  207. # ---------------------------------------------------------------------------------------------------------------------
  208. # Binaries (posix64)
  209. LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
  210. LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
  211. LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
  212. LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
  213. ifeq ($(USING_JUCE),true)
  214. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_basics.posix64.a
  215. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_processors.posix64.a
  216. LIBS_POSIX64 += $(MODULEDIR)/juce_data_structures.posix64.a
  217. LIBS_POSIX64 += $(MODULEDIR)/juce_core.posix64.a
  218. LIBS_POSIX64 += $(MODULEDIR)/juce_events.posix64.a
  219. ifeq ($(MACOS_OR_WIN32),true)
  220. LIBS_POSIX64 += $(MODULEDIR)/juce_graphics.posix64.a
  221. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a
  222. endif
  223. endif
  224. posix64: $(LIBS_POSIX64)
  225. $(MAKE) -C source/bridges-plugin posix64
  226. $(MAKE) -C source/discovery posix64
  227. # ---------------------------------------------------------------------------------------------------------------------
  228. # Binaries (win32)
  229. ifeq ($(BUILDING_FOR_WINDOWS),true)
  230. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32.a
  231. else
  232. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32e.a
  233. endif
  234. LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
  235. LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
  236. LIBS_WIN32 += $(MODULEDIR)/water.win32.a
  237. ifeq ($(USING_JUCE),true)
  238. LIBS_WIN32 += $(MODULEDIR)/juce_audio_basics.win32.a
  239. LIBS_WIN32 += $(MODULEDIR)/juce_audio_processors.win32.a
  240. LIBS_WIN32 += $(MODULEDIR)/juce_data_structures.win32.a
  241. LIBS_WIN32 += $(MODULEDIR)/juce_core.win32.a
  242. LIBS_WIN32 += $(MODULEDIR)/juce_events.win32.a
  243. LIBS_WIN32 += $(MODULEDIR)/juce_graphics.win32.a
  244. LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a
  245. endif
  246. win32: $(LIBS_WIN32)
  247. $(MAKE) -C source/bridges-plugin win32
  248. $(MAKE) -C source/discovery win32
  249. # ---------------------------------------------------------------------------------------------------------------------
  250. # Binaries (win64)
  251. ifeq ($(BUILDING_FOR_WINDOWS),true)
  252. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64.a
  253. else
  254. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64e.a
  255. endif
  256. LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
  257. LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
  258. LIBS_WIN64 += $(MODULEDIR)/water.win64.a
  259. ifeq ($(USING_JUCE),true)
  260. LIBS_WIN64 += $(MODULEDIR)/juce_audio_basics.win64.a
  261. LIBS_WIN64 += $(MODULEDIR)/juce_audio_processors.win64.a
  262. LIBS_WIN64 += $(MODULEDIR)/juce_data_structures.win64.a
  263. LIBS_WIN64 += $(MODULEDIR)/juce_core.win64.a
  264. LIBS_WIN64 += $(MODULEDIR)/juce_events.win64.a
  265. LIBS_WIN64 += $(MODULEDIR)/juce_graphics.win64.a
  266. LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
  267. endif
  268. win64: $(LIBS_WIN64)
  269. $(MAKE) -C source/bridges-plugin win64
  270. $(MAKE) -C source/discovery win64
  271. # ---------------------------------------------------------------------------------------------------------------------
  272. # Binaries (wine)
  273. wine32:
  274. $(MAKE) -C source/jackbridge wine32
  275. cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(CURDIR)/bin/jackbridge-wine32.dll
  276. wine64:
  277. $(MAKE) -C source/jackbridge wine64
  278. cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll
  279. # ---------------------------------------------------------------------------------------------------------------------
  280. clean:
  281. $(MAKE) clean -C source/backend
  282. $(MAKE) clean -C source/bridges-plugin
  283. $(MAKE) clean -C source/bridges-ui
  284. $(MAKE) clean -C source/discovery
  285. $(MAKE) clean -C source/frontend
  286. $(MAKE) clean -C source/interposer
  287. $(MAKE) clean -C source/libjack
  288. $(MAKE) clean -C source/modules
  289. $(MAKE) clean -C source/native-plugins
  290. $(MAKE) clean -C source/plugin
  291. $(MAKE) clean -C source/theme
  292. rm -f *~ source/*~
  293. distclean: clean
  294. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  295. rm -rf build build-lv2
  296. debug:
  297. $(MAKE) DEBUG=true
  298. doxygen:
  299. $(MAKE) doxygen -C source/backend
  300. stoat:
  301. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  302. # stoat --recursive ./build/ \
  303. # --suppression ./data/stoat-supression.txt \
  304. # --whitelist ./data/stoat-whitelist.txt \
  305. # --graph-view ./data/stoat-callgraph.png
  306. # ---------------------------------------------------------------------------------------------------------------------
  307. install_main:
  308. # Create directories
  309. install -d $(DESTDIR)$(BINDIR)
  310. ifeq ($(LINUX),true)
  311. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  312. else
  313. install -d $(DESTDIR)$(LIBDIR)/carla
  314. endif
  315. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  316. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  317. ifeq ($(HAVE_PYQT),true)
  318. # Create directories (gui)
  319. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  320. install -d $(DESTDIR)$(DATADIR)/applications
  321. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  322. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  323. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  324. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  325. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  326. install -d $(DESTDIR)$(DATADIR)/mime/packages
  327. install -d $(DESTDIR)$(DATADIR)/carla/resources
  328. install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
  329. install -d $(DESTDIR)$(DATADIR)/carla/widgets
  330. endif
  331. # -------------------------------------------------------------------------------------------------------------
  332. # Install script files (non-gui)
  333. install -m 755 \
  334. data/carla-single \
  335. $(DESTDIR)$(BINDIR)
  336. # Adjust PREFIX value in script files (non-gui)
  337. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  338. $(DESTDIR)$(BINDIR)/carla-single
  339. # Install backend libs
  340. install -m 644 \
  341. bin/libcarla_*.* \
  342. $(DESTDIR)$(LIBDIR)/carla
  343. # Install other binaries
  344. install -m 755 \
  345. bin/*bridge-* \
  346. bin/carla-discovery-* \
  347. $(DESTDIR)$(LIBDIR)/carla
  348. ifeq ($(LINUX),true)
  349. # Install libjack
  350. install -m 755 \
  351. bin/jack/libjack.so.0 \
  352. $(DESTDIR)$(LIBDIR)/carla/jack
  353. endif
  354. # Install pkg-config files
  355. install -m 644 \
  356. data/*.pc \
  357. $(DESTDIR)$(LIBDIR)/pkgconfig
  358. # Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files
  359. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  360. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  361. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  362. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  363. sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
  364. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  365. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  366. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  367. sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  368. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  369. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  370. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  371. # Install headers
  372. install -m 644 \
  373. source/backend/CarlaBackend.h \
  374. source/backend/CarlaHost.h \
  375. source/backend/CarlaUtils.h \
  376. source/backend/CarlaEngine.hpp \
  377. source/backend/CarlaPlugin.hpp \
  378. source/includes/CarlaNative.h \
  379. $(DESTDIR)$(INCLUDEDIR)/carla
  380. install -m 644 \
  381. source/includes/CarlaDefines.h \
  382. source/includes/CarlaMIDI.h \
  383. source/includes/CarlaNative.h \
  384. source/includes/CarlaNativePlugin.h \
  385. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  386. # -------------------------------------------------------------------------------------------------------------
  387. ifeq ($(HAVE_PYQT),true)
  388. # Install script files (gui)
  389. install -m 755 \
  390. data/carla \
  391. data/carla-database \
  392. data/carla-jack-multi \
  393. data/carla-jack-single \
  394. data/carla-patchbay \
  395. data/carla-rack \
  396. data/carla-settings \
  397. $(DESTDIR)$(BINDIR)
  398. # Adjust PREFIX value in script files (gui)
  399. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  400. $(DESTDIR)$(BINDIR)/carla \
  401. $(DESTDIR)$(BINDIR)/carla-database \
  402. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  403. $(DESTDIR)$(BINDIR)/carla-jack-single \
  404. $(DESTDIR)$(BINDIR)/carla-patchbay \
  405. $(DESTDIR)$(BINDIR)/carla-rack \
  406. $(DESTDIR)$(BINDIR)/carla-settings
  407. ifeq ($(HAVE_LIBLO),true)
  408. install -m 755 \
  409. data/carla-control \
  410. $(DESTDIR)$(BINDIR)
  411. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  412. $(DESTDIR)$(BINDIR)/carla-control
  413. endif
  414. # Install frontend
  415. install -m 644 \
  416. source/frontend/carla \
  417. source/frontend/carla-control \
  418. source/frontend/carla-jack-multi \
  419. source/frontend/carla-jack-single \
  420. source/frontend/carla-patchbay \
  421. source/frontend/carla-rack \
  422. source/frontend/*.py \
  423. $(DESTDIR)$(DATADIR)/carla/
  424. install -m 644 \
  425. source/frontend/patchcanvas/*.py \
  426. $(DESTDIR)$(DATADIR)/carla/patchcanvas/
  427. install -m 644 \
  428. source/frontend/widgets/*.py \
  429. $(DESTDIR)$(DATADIR)/carla/widgets/
  430. # Adjust LIBDIR and DATADIR value in python code
  431. sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  432. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  433. sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  434. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  435. # Install resources (gui)
  436. install -m 755 \
  437. bin/resources/carla-plugin \
  438. bin/resources/carla-plugin-patchbay \
  439. bin/resources/*-ui \
  440. $(DESTDIR)$(DATADIR)/carla/resources
  441. ifeq ($(HAVE_THEME),true)
  442. # Install theme
  443. install -m 644 \
  444. bin/styles/* \
  445. $(DESTDIR)$(LIBDIR)/carla/styles
  446. endif
  447. # Install desktop files
  448. install -m 644 data/carla.desktop $(DESTDIR)$(DATADIR)/applications
  449. ifeq ($(HAVE_LIBLO),true)
  450. install -m 644 data/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  451. endif
  452. # Install mime package
  453. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  454. # Install icons, 16x16
  455. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  456. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  457. # Install icons, 48x48
  458. install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  459. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  460. # Install icons, 128x128
  461. install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  462. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  463. # Install icons, 256x256
  464. install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  465. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  466. # Install icons, scalable
  467. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  468. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  469. # Install resources (re-use python files)
  470. $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
  471. $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
  472. $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  473. $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  474. $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  475. $(LINK) ../carla_control.py $(DESTDIR)$(DATADIR)/carla/resources
  476. $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  477. $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  478. $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  479. $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  480. $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  481. $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  482. $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  483. $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  484. $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  485. $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  486. $(LINK) ../ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources
  487. $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  488. $(LINK) ../ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  489. $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  490. $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  491. $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  492. $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  493. $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  494. $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  495. $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  496. $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  497. $(LINK) ../ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  498. $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  499. $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  500. $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  501. $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  502. endif # HAVE_PYQT
  503. # -------------------------------------------------------------------------------------------------------------
  504. # Install lv2 plugin
  505. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  506. install -m 644 \
  507. bin/carla.lv2/carla.* \
  508. bin/carla.lv2/*.ttl \
  509. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  510. # Link binaries for lv2 plugin
  511. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  512. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  513. done
  514. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  515. ifeq ($(LINUX),true)
  516. # Link jack app bridge
  517. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  518. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  519. endif
  520. # Link resources for lv2 plugin
  521. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  522. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  523. ifeq ($(HAVE_PYQT),true)
  524. # Link styles for lv2 plugin
  525. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  526. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  527. endif
  528. # -------------------------------------------------------------------------------------------------------------
  529. ifneq ($(HAIKU),true)
  530. ifeq ($(HAVE_PYQT),true)
  531. # Install vst plugin
  532. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  533. install -m 644 \
  534. bin/CarlaRack*.* \
  535. bin/CarlaPatchbay*.* \
  536. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  537. # Link binaries for vst plugin
  538. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  539. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  540. done
  541. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  542. # Link jack app bridge
  543. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  544. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  545. # Link resources for vst plugin
  546. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  547. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  548. # Link styles for vst plugin
  549. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  550. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  551. endif
  552. endif
  553. ifneq ($(EXTERNAL_PLUGINS),true)
  554. install_external_plugins:
  555. endif
  556. install: install_main install_external_plugins
  557. # ---------------------------------------------------------------------------------------------------------------------
  558. uninstall:
  559. rm -f $(DESTDIR)$(BINDIR)/carla*
  560. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
  561. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
  562. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  563. rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
  564. rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
  565. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
  566. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
  567. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
  568. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
  569. rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
  570. rm -rf $(DESTDIR)$(LIBDIR)/carla
  571. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  572. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
  573. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
  574. rm -rf $(DESTDIR)$(DATADIR)/carla
  575. rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
  576. # ----------------------------------------------------------------------------------------------------------------------------
  577. ifneq ($(MAKE_TERMOUT),)
  578. ANS_NO=\033[31mNO\033[0m
  579. ANS_YES=\033[32mYES\033[0m
  580. mS=\033[33m[
  581. mZ=\033[30;1m[
  582. mE=]\033[0m
  583. tS=\033[36m
  584. tE=\033[0m
  585. else
  586. ANS_NO=NO
  587. ANS_YES=YES
  588. mS=[
  589. mZ=[
  590. mE=]
  591. endif
  592. features_print_main:
  593. @printf -- "$(tS)---> Main features $(tE)\n"
  594. ifeq ($(HAVE_PYQT),true)
  595. @printf -- "Front-End: $(ANS_YES)\n"
  596. ifneq ($(WIN32),true)
  597. @printf -- "LV2 plugin: $(ANS_YES)\n"
  598. else
  599. @printf -- "LV2 plugin: $(ANS_NO) $(mZ)Not available for Windows$(mE)\n"
  600. endif
  601. ifeq ($(LINUX),true)
  602. ifeq ($(HAVE_X11),true)
  603. @printf -- "VST plugin: $(ANS_YES)\n"
  604. else # HAVE_X11
  605. @printf -- "VST plugin: $(ANS_NO) $(mS)X11 missing$(mE)\n"
  606. endif
  607. else # LINUX
  608. @printf -- "VST plugin: $(ANS_NO) $(mZ)Linux only$(mE)\n"
  609. endif
  610. else
  611. @printf -- "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)\n"
  612. @printf -- "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
  613. @printf -- "VST plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
  614. endif
  615. ifeq ($(HAVE_HYLIA),true)
  616. @printf -- "Link support: $(ANS_YES)\n"
  617. else
  618. ifeq ($(MACOS_OLD),true)
  619. @printf -- "Link support: $(ANS_NO) $(mZ)MacOS >= 10.10 only$(mE)\n"
  620. else
  621. @printf -- "Link support: $(ANS_NO) $(mZ)Linux, MacOS and Windows only$(mE)\n"
  622. endif
  623. endif
  624. ifeq ($(HAVE_LIBLO),true)
  625. @printf -- "OSC support: $(ANS_YES)\n"
  626. else
  627. @printf -- "OSC support: $(ANS_NO) $(mS)Missing liblo$(mE)\n"
  628. endif
  629. ifeq ($(WIN32),true)
  630. @printf -- "Binary detect: $(ANS_YES)\n"
  631. else
  632. ifeq ($(HAVE_LIBMAGIC),true)
  633. @printf -- "Binary detect: $(ANS_YES)\n"
  634. else
  635. @printf -- "Binary detect: $(ANS_NO) $(mS)Missing libmagic/file$(mE)\n"
  636. endif
  637. endif
  638. @printf -- "\n"
  639. @printf -- "$(tS)---> Engine drivers $(tE)\n"
  640. @printf -- "JACK: $(ANS_YES)\n"
  641. ifeq ($(LINUX),true)
  642. ifeq ($(HAVE_ALSA),true)
  643. @printf -- "ALSA: $(ANS_YES)\n"
  644. else
  645. @printf -- "ALSA: $(ANS_NO) $(mS)Missing ALSA$(mE)\n"
  646. endif
  647. else
  648. @printf -- "ALSA: $(ANS_NO) $(mZ)Linux only$(mE)\n"
  649. endif
  650. ifeq ($(UNIX),true)
  651. ifneq ($(MACOS),true)
  652. ifeq ($(HAVE_PULSEAUDIO),true)
  653. @printf -- "PulseAudio: $(ANS_YES)\n"
  654. else
  655. @printf -- "PulseAudio: $(ANS_NO) $(mS)Missing PulseAudio$(mE)\n"
  656. endif
  657. else
  658. @printf -- "PulseAudio: $(ANS_NO) $(mZ)Not available for MacOS$(mE)\n"
  659. endif
  660. else
  661. @printf -- "PulseAudio: $(ANS_NO) $(mZ)Only available for Unix systems$(mE)\n"
  662. endif
  663. ifeq ($(MACOS),true)
  664. @printf -- "CoreAudio: $(ANS_YES)\n"
  665. else
  666. @printf -- "CoreAudio: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  667. endif
  668. ifeq ($(WIN32),true)
  669. @printf -- "ASIO: $(ANS_YES)\n"
  670. @printf -- "DirectSound: $(ANS_YES)\n"
  671. @printf -- "WASAPI: $(ANS_YES)\n"
  672. else
  673. @printf -- "ASIO: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  674. @printf -- "DirectSound: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  675. @printf -- "WASAPI: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  676. endif
  677. @printf -- "\n"
  678. @printf -- "$(tS)---> Plugin formats: $(tE)\n"
  679. @printf -- "Internal: $(ANS_YES)\n"
  680. @printf -- "LADSPA: $(ANS_YES)\n"
  681. @printf -- "DSSI: $(ANS_YES)\n"
  682. @printf -- "LV2: $(ANS_YES)\n"
  683. ifeq ($(MACOS_OR_WIN32),true)
  684. @printf -- "VST: $(ANS_YES) (with UI)\n"
  685. else
  686. ifeq ($(HAIKU),true)
  687. @printf -- "VST: $(ANS_YES) (without UI)\n"
  688. else
  689. ifeq ($(HAVE_X11),true)
  690. @printf -- "VST: $(ANS_YES) (with UI)\n"
  691. else
  692. @printf -- "VST: $(ANS_YES) (without UI) $(mS)Missing X11$(mE)\n"
  693. endif
  694. endif
  695. endif
  696. @printf -- "\n"
  697. @printf -- "$(tS)---> LV2 UI toolkit support: $(tE)\n"
  698. @printf -- "External: $(ANS_YES) (direct)\n"
  699. ifneq ($(MACOS_OR_WIN32),true)
  700. ifeq ($(HAVE_GTK2),true)
  701. @printf -- "Gtk2: $(ANS_YES) (bridge)\n"
  702. else
  703. @printf -- "Gtk2: $(ANS_NO) $(mS)Gtk2 missing$(mE)\n"
  704. endif
  705. ifeq ($(HAVE_GTK3),true)
  706. @printf -- "Gtk3: $(ANS_YES) (bridge)\n"
  707. else
  708. @printf -- "Gtk3: $(ANS_NO) $(mS)Gtk3 missing$(mE)\n"
  709. endif
  710. ifeq ($(HAVE_QT4),true)
  711. @printf -- "Qt4: $(ANS_YES) (bridge)\n"
  712. else
  713. @printf -- "Qt4: $(ANS_NO) $(mS)Qt4 missing$(mE)\n"
  714. endif
  715. ifeq ($(HAVE_QT5),true)
  716. @printf -- "Qt5: $(ANS_YES) (bridge)\n"
  717. else
  718. @printf -- "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)\n"
  719. endif
  720. ifeq ($(HAVE_X11),true)
  721. @printf -- "X11: $(ANS_YES) (direct+bridge)\n"
  722. else
  723. @printf -- "X11: $(ANS_NO) $(mS)X11 missing$(mE)\n"
  724. endif
  725. else # LINUX
  726. @printf -- "Gtk2: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  727. @printf -- "Gtk3: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  728. @printf -- "Qt4: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  729. @printf -- "Qt5: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  730. @printf -- "X11: $(ANS_NO) $(mZ)Not available for Windows or MacOS$(mE)\n"
  731. endif # LINUX
  732. ifeq ($(MACOS),true)
  733. @printf -- "Cocoa: $(ANS_YES) (direct+bridge)\n"
  734. else
  735. @printf -- "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)\n"
  736. endif
  737. ifeq ($(WIN32),true)
  738. @printf -- "Windows: $(ANS_YES) (direct+bridge)\n"
  739. else
  740. @printf -- "Windows: $(ANS_NO) $(mZ)Windows only$(mE)\n"
  741. endif
  742. @printf -- "\n"
  743. @printf -- "$(tS)---> File formats: $(tE)\n"
  744. ifeq ($(HAVE_SNDFILE),true)
  745. @printf -- "Basic: $(ANS_YES)\n"
  746. else
  747. @printf -- "Basic: $(ANS_NO) $(mS)libsndfile missing$(mE)\n"
  748. endif
  749. ifeq ($(HAVE_FFMPEG),true)
  750. @printf -- "Extra: $(ANS_YES)\n"
  751. else
  752. @printf -- "Extra: $(ANS_NO) $(mS)FFmpeg missing or too new$(mE)\n"
  753. endif
  754. ifeq ($(HAVE_FLUIDSYNTH),true)
  755. @printf -- "SF2/3: $(ANS_YES)\n"
  756. else
  757. @printf -- "SF2/3: $(ANS_NO) $(mS)FluidSynth missing or too old$(mE)\n"
  758. endif
  759. @printf -- "SFZ: $(ANS_YES)\n"
  760. @printf -- "\n"
  761. @printf -- "$(tS)---> Internal plugins: $(tE)\n"
  762. @printf -- "Basic Plugins: $(ANS_YES)\n"
  763. ifneq ($(WIN32),true)
  764. @printf -- "Carla-Patchbay: $(ANS_YES)\n"
  765. @printf -- "Carla-Rack: $(ANS_YES)\n"
  766. else
  767. @printf -- "Carla-Patchbay: $(ANS_NO) $(mS)Not available for Windows$(mE)\n"
  768. @printf -- "Carla-Rack: $(ANS_NO) $(mS)Not available for Windows$(mE)\n"
  769. endif
  770. ifeq ($(EXTERNAL_PLUGINS),true)
  771. @printf -- "External Plugins: $(ANS_YES)\n"
  772. else
  773. @printf -- "External Plugins: $(ANS_NO)\n"
  774. endif
  775. ifneq ($(EXTERNAL_PLUGINS),true)
  776. features_print_external_plugins:
  777. endif
  778. features: features_print_main features_print_external_plugins
  779. # ---------------------------------------------------------------------------------------------------------------------
  780. .FORCE:
  781. .PHONY: .FORCE
  782. # ---------------------------------------------------------------------------------------------------------------------