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