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