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

11 years ago
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863
  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. # see also source/frontend/carla_shared.py and source/includes/CarlaDefines.h
  21. VERSION := 2.4.3
  22. -include Makefile.user.mk
  23. # ---------------------------------------------------------------------------------------------------------------------
  24. all: backend discovery bridges-plugin bridges-ui frontend interposer libjack plugin theme
  25. # ---------------------------------------------------------------------------------------------------------------------
  26. # Binaries (native)
  27. ifneq ($(STATIC_PLUGIN_TARGET),true)
  28. ALL_LIBS += $(MODULEDIR)/carla_engine.a
  29. endif
  30. ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a
  31. ALL_LIBS += $(MODULEDIR)/carla_plugin.a
  32. ALL_LIBS += $(MODULEDIR)/jackbridge.a
  33. ifeq ($(STATIC_PLUGIN_TARGET),true)
  34. ALL_LIBS += $(MODULEDIR)/jackbridge.min.a
  35. endif
  36. ALL_LIBS += $(MODULEDIR)/native-plugins.a
  37. ALL_LIBS += $(MODULEDIR)/rtmempool.a
  38. 3RD_LIBS += $(MODULEDIR)/audio_decoder.a
  39. 3RD_LIBS += $(MODULEDIR)/lilv.a
  40. 3RD_LIBS += $(MODULEDIR)/sfzero.a
  41. 3RD_LIBS += $(MODULEDIR)/water.a
  42. 3RD_LIBS += $(MODULEDIR)/zita-resampler.a
  43. ifeq ($(HAVE_DGL),true)
  44. ifneq ($(USING_CUSTOM_DPF),true)
  45. 3RD_LIBS += $(MODULEDIR)/dgl.a
  46. endif
  47. endif
  48. ifeq ($(HAVE_HYLIA),true)
  49. 3RD_LIBS += $(MODULEDIR)/hylia.a
  50. endif
  51. ifeq ($(HAVE_QT4),true)
  52. 3RD_LIBS += $(MODULEDIR)/theme.qt4.a
  53. endif
  54. ifeq ($(HAVE_QT5),true)
  55. 3RD_LIBS += $(MODULEDIR)/theme.qt5.a
  56. endif
  57. ifeq ($(USING_JUCE),true)
  58. 3RD_LIBS += $(MODULEDIR)/carla_juce.a
  59. 3RD_LIBS += $(MODULEDIR)/juce_audio_basics.a
  60. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  61. 3RD_LIBS += $(MODULEDIR)/juce_audio_devices.a
  62. endif
  63. 3RD_LIBS += $(MODULEDIR)/juce_audio_processors.a
  64. 3RD_LIBS += $(MODULEDIR)/juce_core.a
  65. 3RD_LIBS += $(MODULEDIR)/juce_data_structures.a
  66. 3RD_LIBS += $(MODULEDIR)/juce_events.a
  67. 3RD_LIBS += $(MODULEDIR)/juce_graphics.a
  68. 3RD_LIBS += $(MODULEDIR)/juce_gui_basics.a
  69. 3RD_LIBS += $(MODULEDIR)/juce_gui_extra.a
  70. endif
  71. ifeq ($(USING_RTAUDIO),true)
  72. 3RD_LIBS += $(MODULEDIR)/rtaudio.a
  73. 3RD_LIBS += $(MODULEDIR)/rtmidi.a
  74. endif
  75. 3RD_LIBS += $(MODULEDIR)/ysfx.a
  76. ALL_LIBS += $(3RD_LIBS)
  77. 3rd: $(3RD_LIBS)
  78. @$(MAKE) -C source/theme
  79. ifeq ($(HAVE_QT4),true)
  80. @$(MAKE) -C source/bridges-ui ui_lv2-qt4
  81. endif
  82. libs: $(ALL_LIBS)
  83. $(MODULEDIR)/carla_engine.a: .FORCE
  84. @$(MAKE) -C source/backend/engine
  85. $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a
  86. @$(MAKE) -C source/backend/engine
  87. $(MODULEDIR)/carla_plugin.a: .FORCE
  88. @$(MAKE) -C source/backend/plugin
  89. $(MODULEDIR)/jackbridge.a: .FORCE
  90. @$(MAKE) -C source/jackbridge
  91. $(MODULEDIR)/jackbridge.%.a: $(MODULEDIR)/jackbridge.a
  92. @$(MAKE) -C source/jackbridge $*
  93. $(MODULEDIR)/native-plugins.a: .FORCE
  94. @$(MAKE) -C source/native-plugins
  95. $(MODULEDIR)/theme.qt4.a: .FORCE
  96. @$(MAKE) -C source/theme qt4
  97. $(MODULEDIR)/theme.qt5.a: .FORCE
  98. @$(MAKE) -C source/theme qt5
  99. $(MODULEDIR)/%.arm32.a: .FORCE
  100. ifneq ($(WINDOWS),true)
  101. @$(MAKE) -C source/modules/$* arm32
  102. else
  103. $(error Trying to build ARM binaries with a Windows toolchain, this cannot work)
  104. endif
  105. $(MODULEDIR)/%.posix32.a: .FORCE
  106. ifneq ($(WINDOWS),true)
  107. @$(MAKE) -C source/modules/$* posix32
  108. else
  109. $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
  110. endif
  111. $(MODULEDIR)/%.posix64.a: .FORCE
  112. ifneq ($(WINDOWS),true)
  113. @$(MAKE) -C source/modules/$* posix64
  114. else
  115. $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
  116. endif
  117. $(MODULEDIR)/%.win32.a: .FORCE
  118. ifeq ($(WINDOWS),true)
  119. @$(MAKE) -C source/modules/$* win32
  120. else
  121. $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
  122. endif
  123. $(MODULEDIR)/%.win64.a: .FORCE
  124. ifeq ($(WINDOWS),true)
  125. @$(MAKE) -C source/modules/$* win64
  126. else
  127. $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
  128. endif
  129. $(MODULEDIR)/dgl.wine.a: .FORCE
  130. @$(MAKE) -C source/modules/dgl wine
  131. $(MODULEDIR)/water.files.a: .FORCE
  132. @$(MAKE) -C source/modules/water files
  133. $(MODULEDIR)/%.a: .FORCE
  134. @$(MAKE) -C source/modules/$*
  135. # ---------------------------------------------------------------------------------------------------------------------
  136. backend: libs
  137. @$(MAKE) -C source/backend
  138. bridges-plugin: libs
  139. @$(MAKE) -C source/bridges-plugin
  140. bridges-ui: libs
  141. @$(MAKE) -C source/bridges-ui
  142. discovery: libs
  143. @$(MAKE) -C source/discovery
  144. frontend: libs
  145. ifeq ($(HAVE_PYQT),true)
  146. @$(MAKE) -C source/frontend
  147. endif
  148. interposer:
  149. ifeq ($(LINUX),true)
  150. @$(MAKE) -C source/interposer
  151. endif
  152. libjack: libs
  153. @$(MAKE) -C source/libjack
  154. lv2-bundles-dep: $(MODULEDIR)/audio_decoder.a $(MODULEDIR)/water.a $(MODULEDIR)/zita-resampler.a
  155. @$(MAKE) -C source/native-plugins bundles
  156. lv2-bundles: lv2-bundles-dep
  157. @$(MAKE) -C source/plugin bundles
  158. plugin: backend bridges-plugin bridges-ui discovery
  159. @$(MAKE) -C source/plugin
  160. ifeq ($(WINDOWS),true)
  161. plugin-wine:
  162. @$(MAKE) -C source/plugin wine
  163. else
  164. plugin-wine: $(MODULEDIR)/dgl.wine.a
  165. @$(MAKE) -C source/plugin wine
  166. endif
  167. rest: libs
  168. @$(MAKE) -C source/rest
  169. theme: libs
  170. @$(MAKE) -C source/theme
  171. # ---------------------------------------------------------------------------------------------------------------------
  172. # static targets
  173. static-backend: libs
  174. @$(MAKE) -C source/backend static
  175. static-plugin: static-backend
  176. @$(MAKE) -C source/plugin static
  177. # ---------------------------------------------------------------------------------------------------------------------
  178. # hacks
  179. msys2fix:
  180. rm -rf source/includes/serd
  181. rm -rf source/includes/sord
  182. rm -rf source/includes/sratom
  183. rm -rf source/includes/lilv
  184. cp -r source/modules/lilv/serd-0.24.0/serd source/includes/serd
  185. cp -r source/modules/lilv/sord-0.16.0/sord source/includes/sord
  186. cp -r source/modules/lilv/sratom-0.6.0/sratom source/includes/sratom
  187. cp -r source/modules/lilv/lilv-0.24.0/lilv source/includes/lilv
  188. # ---------------------------------------------------------------------------------------------------------------------
  189. # Binaries (arm32)
  190. LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
  191. LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
  192. LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
  193. LIBS_ARM32 += $(MODULEDIR)/water.arm32.a
  194. arm32: $(LIBS_ARM32)
  195. $(MAKE) -C source/bridges-plugin arm32
  196. $(MAKE) -C source/discovery arm32
  197. # ---------------------------------------------------------------------------------------------------------------------
  198. # Binaries (posix32)
  199. LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
  200. LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
  201. LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
  202. LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
  203. ifeq ($(USING_JUCE),true)
  204. LIBS_POSIX32 += $(MODULEDIR)/carla_juce.posix32.a
  205. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_basics.posix32.a
  206. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_processors.posix32.a
  207. LIBS_POSIX32 += $(MODULEDIR)/juce_data_structures.posix32.a
  208. LIBS_POSIX32 += $(MODULEDIR)/juce_core.posix32.a
  209. LIBS_POSIX32 += $(MODULEDIR)/juce_events.posix32.a
  210. LIBS_POSIX32 += $(MODULEDIR)/juce_graphics.posix32.a
  211. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a
  212. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a
  213. endif
  214. posix32: $(LIBS_POSIX32)
  215. $(MAKE) -C source/bridges-plugin posix32
  216. $(MAKE) -C source/discovery posix32
  217. # ---------------------------------------------------------------------------------------------------------------------
  218. # Binaries (posix64)
  219. LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
  220. LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
  221. LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
  222. LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
  223. ifeq ($(USING_JUCE),true)
  224. LIBS_POSIX64 += $(MODULEDIR)/carla_juce.posix64.a
  225. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_basics.posix64.a
  226. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_processors.posix64.a
  227. LIBS_POSIX64 += $(MODULEDIR)/juce_data_structures.posix64.a
  228. LIBS_POSIX64 += $(MODULEDIR)/juce_core.posix64.a
  229. LIBS_POSIX64 += $(MODULEDIR)/juce_events.posix64.a
  230. LIBS_POSIX64 += $(MODULEDIR)/juce_graphics.posix64.a
  231. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a
  232. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a
  233. endif
  234. posix64: $(LIBS_POSIX64)
  235. $(MAKE) -C source/bridges-plugin posix64
  236. $(MAKE) -C source/discovery posix64
  237. # ---------------------------------------------------------------------------------------------------------------------
  238. # Binaries (win32)
  239. LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
  240. LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
  241. LIBS_WIN32 += $(MODULEDIR)/water.win32.a
  242. ifeq ($(USING_JUCE),true)
  243. LIBS_WIN32 += $(MODULEDIR)/carla_juce.win32.a
  244. LIBS_WIN32 += $(MODULEDIR)/juce_audio_basics.win32.a
  245. LIBS_WIN32 += $(MODULEDIR)/juce_audio_processors.win32.a
  246. LIBS_WIN32 += $(MODULEDIR)/juce_data_structures.win32.a
  247. LIBS_WIN32 += $(MODULEDIR)/juce_core.win32.a
  248. LIBS_WIN32 += $(MODULEDIR)/juce_events.win32.a
  249. LIBS_WIN32 += $(MODULEDIR)/juce_graphics.win32.a
  250. LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a
  251. LIBS_WIN32 += $(MODULEDIR)/juce_gui_extra.win32.a
  252. endif
  253. LIBS_WINE32 = $(LIBS_WIN32) $(MODULEDIR)/jackbridge.win32e.a
  254. LIBS_RWIN32 = $(LIBS_WIN32) $(MODULEDIR)/jackbridge.win32.a
  255. win32: $(LIBS_WINE32)
  256. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win32
  257. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win32
  258. win32r: $(LIBS_RWIN32)
  259. ifeq ($(CC),x86_64-w64-mingw32-gcc)
  260. $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ -C source/bridges-plugin win32
  261. $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ -C source/discovery win32
  262. else
  263. $(MAKE) -C source/bridges-plugin win32
  264. $(MAKE) -C source/discovery win32
  265. endif
  266. # ---------------------------------------------------------------------------------------------------------------------
  267. # Binaries (win64)
  268. LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
  269. LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
  270. LIBS_WIN64 += $(MODULEDIR)/water.win64.a
  271. ifeq ($(USING_JUCE),true)
  272. LIBS_WIN64 += $(MODULEDIR)/carla_juce.win64.a
  273. LIBS_WIN64 += $(MODULEDIR)/juce_audio_basics.win64.a
  274. LIBS_WIN64 += $(MODULEDIR)/juce_audio_processors.win64.a
  275. LIBS_WIN64 += $(MODULEDIR)/juce_data_structures.win64.a
  276. LIBS_WIN64 += $(MODULEDIR)/juce_core.win64.a
  277. LIBS_WIN64 += $(MODULEDIR)/juce_events.win64.a
  278. LIBS_WIN64 += $(MODULEDIR)/juce_graphics.win64.a
  279. LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
  280. LIBS_WIN64 += $(MODULEDIR)/juce_gui_extra.win64.a
  281. endif
  282. LIBS_WINE64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64e.a
  283. LIBS_RWIN64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64.a
  284. win64: $(LIBS_WINE64)
  285. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
  286. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
  287. win64r: $(LIBS_RWIN64)
  288. ifeq ($(CC),i686-w64-mingw32-gcc)
  289. $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/bridges-plugin win64
  290. $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/discovery win64
  291. else
  292. $(MAKE) -C source/bridges-plugin win64
  293. $(MAKE) -C source/discovery win64
  294. endif
  295. # ---------------------------------------------------------------------------------------------------------------------
  296. # Binaries (wine)
  297. wine32:
  298. $(MAKE) -C source/jackbridge wine32
  299. cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(CURDIR)/bin/jackbridge-wine32.dll
  300. wine64:
  301. $(MAKE) -C source/jackbridge wine64
  302. cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll
  303. # ---------------------------------------------------------------------------------------------------------------------
  304. clean:
  305. $(MAKE) clean -C source/backend
  306. $(MAKE) clean -C source/bridges-plugin
  307. $(MAKE) clean -C source/bridges-ui
  308. $(MAKE) clean -C source/jackbridge
  309. $(MAKE) clean -C source/modules
  310. $(MAKE) clean -C source/native-plugins
  311. $(MAKE) clean -C source/plugin
  312. ifneq ($(STATIC_PLUGIN_TARGET),true)
  313. $(MAKE) clean -C source/discovery
  314. $(MAKE) clean -C source/frontend
  315. $(MAKE) clean -C source/interposer
  316. $(MAKE) clean -C source/libjack
  317. $(MAKE) clean -C source/tests
  318. $(MAKE) clean -C source/theme
  319. endif
  320. rm -f *~ source/*~
  321. distclean: clean
  322. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  323. rm -rf build build-lv2
  324. cpp:
  325. $(MAKE) CPPMODE=true
  326. debug:
  327. $(MAKE) DEBUG=true
  328. doxygen:
  329. $(MAKE) doxygen -C source/backend
  330. tests:
  331. $(MAKE) -C source/tests
  332. stoat:
  333. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  334. # stoat --recursive ./build/ \
  335. # --suppression ./data/stoat-supression.txt \
  336. # --whitelist ./data/stoat-whitelist.txt \
  337. # --graph-view ./data/stoat-callgraph.png
  338. # ---------------------------------------------------------------------------------------------------------------------
  339. install_main:
  340. # Create directories
  341. install -d $(DESTDIR)$(BINDIR)
  342. install -d $(DESTDIR)$(DATADIR)/carla/resources
  343. ifeq ($(LINUX),true)
  344. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  345. else
  346. install -d $(DESTDIR)$(LIBDIR)/carla
  347. endif
  348. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  349. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  350. ifeq ($(LINUX),true)
  351. ifeq ($(HAVE_JACK),true)
  352. ifeq ($(JACKBRIDGE_DIRECT),true)
  353. install -d $(DESTDIR)$(JACK_LIBDIR)
  354. endif
  355. endif
  356. endif
  357. ifeq ($(HAVE_PYQT),true)
  358. # Create directories (gui)
  359. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  360. install -d $(DESTDIR)$(PREFIX)/share/appdata
  361. install -d $(DESTDIR)$(DATADIR)/applications
  362. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  363. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
  364. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  365. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  366. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  367. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  368. install -d $(DESTDIR)$(DATADIR)/mime/packages
  369. install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
  370. install -d $(DESTDIR)$(DATADIR)/carla/modgui
  371. install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
  372. install -d $(DESTDIR)$(DATADIR)/carla/widgets
  373. endif
  374. # -------------------------------------------------------------------------------------------------------------
  375. # Install script files (non-gui)
  376. install -m 755 \
  377. data/carla-single \
  378. $(DESTDIR)$(BINDIR)
  379. # Adjust PREFIX value in script files (non-gui)
  380. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  381. $(DESTDIR)$(BINDIR)/carla-single
  382. # Install backend libs
  383. install -m 644 \
  384. bin/libcarla_*.* \
  385. $(DESTDIR)$(LIBDIR)/carla
  386. # Install other binaries
  387. install -m 755 \
  388. bin/*bridge-* \
  389. bin/carla-discovery-* \
  390. $(DESTDIR)$(LIBDIR)/carla
  391. ifeq ($(LINUX),true)
  392. ifeq ($(HAVE_JACK),true)
  393. ifeq ($(JACKBRIDGE_DIRECT),true)
  394. # Install internal jack client
  395. ln -sf \
  396. $(LIBDIR)/carla/libcarla_standalone2.so \
  397. $(DESTDIR)$(JACK_LIBDIR)/carla.so
  398. endif
  399. endif
  400. ifneq ($(JACKBRIDGE_DIRECT),true)
  401. # Install custom libjack
  402. install -m 755 \
  403. bin/jack/libjack.so.0 \
  404. $(DESTDIR)$(LIBDIR)/carla/jack
  405. endif
  406. endif
  407. # Install pkg-config files
  408. install -m 644 \
  409. data/pkgconfig/*.pc \
  410. $(DESTDIR)$(LIBDIR)/pkgconfig
  411. # Adjust PREFIX, LIBDIR, INCLUDEDIR and VERSION in pkg-config files
  412. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  413. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  414. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  415. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  416. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  417. sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
  418. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  419. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  420. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  421. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  422. sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  423. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  424. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  425. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  426. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  427. sed $(SED_ARGS) 's?X-VERSION-X?$(VERSION)?' \
  428. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  429. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  430. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  431. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  432. # Install headers
  433. install -m 644 \
  434. source/backend/CarlaBackend.h \
  435. source/backend/CarlaHost.h \
  436. source/backend/CarlaUtils.h \
  437. source/backend/CarlaEngine.hpp \
  438. source/backend/CarlaPlugin.hpp \
  439. source/backend/CarlaPluginPtr.hpp \
  440. source/includes/CarlaNative.h \
  441. source/includes/CarlaNativePlugin.h \
  442. $(DESTDIR)$(INCLUDEDIR)/carla
  443. install -m 644 \
  444. source/includes/CarlaDefines.h \
  445. source/includes/CarlaMIDI.h \
  446. source/includes/CarlaNative.h \
  447. source/includes/CarlaNativePlugin.h \
  448. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  449. # -------------------------------------------------------------------------------------------------------------
  450. ifeq ($(HAVE_PYQT),true)
  451. ifneq ($(CPPMODE),true)
  452. # Install script files (gui)
  453. install -m 755 \
  454. data/carla \
  455. data/carla-database \
  456. data/carla-jack-multi \
  457. data/carla-jack-single \
  458. data/carla-jack-patchbayplugin \
  459. data/carla-osc-gui \
  460. data/carla-patchbay \
  461. data/carla-rack \
  462. data/carla-settings \
  463. $(DESTDIR)$(BINDIR)
  464. # Adjust PREFIX value in script files (gui)
  465. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  466. $(DESTDIR)$(BINDIR)/carla \
  467. $(DESTDIR)$(BINDIR)/carla-database \
  468. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  469. $(DESTDIR)$(BINDIR)/carla-jack-single \
  470. $(DESTDIR)$(BINDIR)/carla-jack-patchbayplugin \
  471. $(DESTDIR)$(BINDIR)/carla-osc-gui \
  472. $(DESTDIR)$(BINDIR)/carla-patchbay \
  473. $(DESTDIR)$(BINDIR)/carla-rack \
  474. $(DESTDIR)$(BINDIR)/carla-settings
  475. ifeq ($(HAVE_LIBLO),true)
  476. install -m 755 \
  477. data/carla-control \
  478. $(DESTDIR)$(BINDIR)
  479. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  480. $(DESTDIR)$(BINDIR)/carla-control
  481. endif
  482. # Install the real modgui bridge
  483. install -m 755 \
  484. data/carla-bridge-lv2-modgui \
  485. $(DESTDIR)$(LIBDIR)/carla
  486. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  487. $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  488. # Install frontend
  489. install -m 644 \
  490. source/frontend/carla \
  491. source/frontend/carla-control \
  492. source/frontend/carla-jack-multi \
  493. source/frontend/carla-jack-single \
  494. source/frontend/carla-patchbay \
  495. source/frontend/carla-rack \
  496. source/frontend/*.py \
  497. $(DESTDIR)$(DATADIR)/carla/
  498. install -m 644 \
  499. source/frontend/modgui/*.py \
  500. $(DESTDIR)$(DATADIR)/carla/modgui/
  501. install -m 644 \
  502. source/frontend/patchcanvas/*.py \
  503. $(DESTDIR)$(DATADIR)/carla/patchcanvas/
  504. install -m 644 \
  505. source/frontend/widgets/*.py \
  506. $(DESTDIR)$(DATADIR)/carla/widgets/
  507. # Adjust LIBDIR and DATADIR value in python code
  508. sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  509. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  510. sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  511. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  512. # Install resources (gui)
  513. install -m 755 \
  514. bin/resources/carla-plugin \
  515. bin/resources/carla-plugin-patchbay \
  516. bin/resources/*-ui \
  517. $(DESTDIR)$(DATADIR)/carla/resources
  518. endif # CPPMODE
  519. ifeq ($(HAVE_THEME),true)
  520. # Install theme
  521. install -m 644 \
  522. bin/styles/* \
  523. $(DESTDIR)$(LIBDIR)/carla/styles
  524. endif
  525. # Install desktop files
  526. install -m 644 data/desktop/carla.desktop $(DESTDIR)$(DATADIR)/applications
  527. install -m 644 data/desktop/carla-rack.desktop $(DESTDIR)$(DATADIR)/applications
  528. install -m 644 data/desktop/carla-patchbay.desktop $(DESTDIR)$(DATADIR)/applications
  529. install -m 644 data/desktop/carla-jack-single.desktop $(DESTDIR)$(DATADIR)/applications
  530. install -m 644 data/desktop/carla-jack-multi.desktop $(DESTDIR)$(DATADIR)/applications
  531. ifeq ($(HAVE_LIBLO),true)
  532. install -m 644 data/desktop/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  533. endif
  534. # Install app data
  535. sed -e 's?X-VERSION-X?$(VERSION)?' \
  536. data/appdata.xml.in > $(DESTDIR)$(PREFIX)/share/appdata/studio.kx.carla.appdata.xml
  537. # Install mime package
  538. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  539. # Install icons, 16x16
  540. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  541. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  542. # Install icons, 32x32
  543. install -m 644 resources/32x32/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
  544. install -m 644 resources/32x32/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
  545. # Install icons, 48x48
  546. install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  547. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  548. # Install icons, 128x128
  549. install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  550. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  551. # Install icons, 256x256
  552. install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  553. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  554. # Install icons, scalable
  555. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  556. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  557. # Install resources (re-use python files)
  558. $(LINK) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
  559. $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
  560. $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
  561. $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  562. $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  563. $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  564. $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  565. $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  566. $(LINK) ../carla_host_control.py $(DESTDIR)$(DATADIR)/carla/resources
  567. $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  568. $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  569. $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  570. $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  571. $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  572. $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  573. $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  574. $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  575. $(LINK) ../ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources
  576. $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  577. $(LINK) ../ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  578. $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  579. $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  580. $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  581. $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  582. $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  583. $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  584. $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  585. $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  586. $(LINK) ../ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  587. $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  588. $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  589. $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  590. $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  591. $(LINK) ../ui_xycontroller.py $(DESTDIR)$(DATADIR)/carla/resources
  592. # Install translations
  593. $(foreach l,$(I18N_LANGUAGES),install -m 644 \
  594. source/frontend/translations/carla_$(l).qm \
  595. $(DESTDIR)$(DATADIR)/carla/resources/translations/;)
  596. endif # HAVE_PYQT
  597. # -------------------------------------------------------------------------------------------------------------
  598. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  599. # Install lv2 plugin
  600. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  601. install -m 644 \
  602. bin/carla.lv2/carla.* \
  603. bin/carla.lv2/*.ttl \
  604. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  605. # Link binaries for lv2 plugin
  606. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  607. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  608. done
  609. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  610. ifeq ($(LINUX),true)
  611. # Link jack app bridge
  612. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  613. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  614. endif
  615. endif # CAN_GENERATE_LV2_TTL
  616. ifeq ($(HAVE_PYQT),true)
  617. # Link resources for lv2 plugin
  618. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  619. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  620. # Link styles for lv2 plugin
  621. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  622. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  623. endif
  624. # -------------------------------------------------------------------------------------------------------------
  625. ifneq ($(HAIKU),true)
  626. ifeq ($(HAVE_PYQT),true)
  627. # Install vst plugin
  628. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  629. install -m 644 \
  630. bin/CarlaRack*.* \
  631. bin/CarlaPatchbay*.* \
  632. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  633. # Link binaries for vst plugin
  634. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  635. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  636. done
  637. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  638. # Link jack app bridge
  639. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  640. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  641. # Link resources for vst plugin
  642. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  643. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  644. # Link styles for vst plugin
  645. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  646. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  647. endif
  648. endif
  649. # -------------------------------------------------------------------------------------------------------------
  650. ifneq ($(HAVE_PYQT),true)
  651. # Remove gui files for non-gui build
  652. rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  653. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  654. rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
  655. endif
  656. endif
  657. # ---------------------------------------------------------------------------------------------------------------------
  658. ifneq ($(EXTERNAL_PLUGINS),true)
  659. install_external_plugins:
  660. endif
  661. install: install_main install_external_plugins
  662. # ---------------------------------------------------------------------------------------------------------------------
  663. uninstall:
  664. rm -f $(DESTDIR)$(BINDIR)/carla*
  665. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc
  666. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
  667. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
  668. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  669. rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
  670. rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
  671. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
  672. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
  673. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
  674. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
  675. rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
  676. rm -rf $(DESTDIR)$(LIBDIR)/carla
  677. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  678. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
  679. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
  680. rm -rf $(DESTDIR)$(DATADIR)/carla
  681. rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
  682. # ----------------------------------------------------------------------------------------------------------------------------
  683. ifeq ($(MACOS),true)
  684. ifneq ($(MACOS_OLD),true)
  685. HAVE_DIST = true
  686. endif
  687. endif
  688. ifeq ($(WINDOWS),true)
  689. HAVE_DIST = true
  690. endif
  691. ifeq ($(HAVE_DIST),true)
  692. include Makefile.dist.mk
  693. else
  694. dist:
  695. endif
  696. include Makefile.print.mk
  697. # ---------------------------------------------------------------------------------------------------------------------
  698. .FORCE:
  699. .PHONY: .FORCE
  700. # ---------------------------------------------------------------------------------------------------------------------