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

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