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