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

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