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