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.

847 lines
27KB

  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. # nuitka
  175. nuitka: bin/carla bin/carla-rack bin/carla-plugin
  176. bin/carla:
  177. python3 -m nuitka \
  178. -j 4 \
  179. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  180. --follow-imports \
  181. -o ./$@ \
  182. ./source/frontend/carla
  183. bin/carla-rack:
  184. python3 -m nuitka \
  185. -j 8 \
  186. --recurse-all \
  187. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  188. --recurse-not-to=PyQt5 \
  189. --file-reference-choice=runtime \
  190. -o ./$@ \
  191. ./source/frontend/carla
  192. bin/carla-plugin:
  193. python3 -m nuitka \
  194. -j 8 \
  195. --recurse-all \
  196. --python-flag -O --warn-unusual-code --warn-implicit-exceptions \
  197. --recurse-not-to=PyQt5 \
  198. --file-reference-choice=runtime \
  199. -o ./$@ \
  200. ./source/native-plugins/resources/carla-plugin
  201. # ---------------------------------------------------------------------------------------------------------------------
  202. # Binaries (arm32)
  203. LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
  204. LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
  205. LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
  206. LIBS_ARM32 += $(MODULEDIR)/water.arm32.a
  207. arm32: $(LIBS_ARM32)
  208. $(MAKE) -C source/bridges-plugin arm32
  209. $(MAKE) -C source/discovery arm32
  210. # ---------------------------------------------------------------------------------------------------------------------
  211. # Binaries (posix32)
  212. LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
  213. LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
  214. LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
  215. LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
  216. ifeq ($(USING_JUCE),true)
  217. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_basics.posix32.a
  218. LIBS_POSIX32 += $(MODULEDIR)/juce_audio_processors.posix32.a
  219. LIBS_POSIX32 += $(MODULEDIR)/juce_data_structures.posix32.a
  220. LIBS_POSIX32 += $(MODULEDIR)/juce_core.posix32.a
  221. LIBS_POSIX32 += $(MODULEDIR)/juce_events.posix32.a
  222. LIBS_POSIX32 += $(MODULEDIR)/juce_graphics.posix32.a
  223. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a
  224. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  225. LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a
  226. endif
  227. endif
  228. posix32: $(LIBS_POSIX32)
  229. $(MAKE) -C source/bridges-plugin posix32
  230. $(MAKE) -C source/discovery posix32
  231. # ---------------------------------------------------------------------------------------------------------------------
  232. # Binaries (posix64)
  233. LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
  234. LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
  235. LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
  236. LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
  237. ifeq ($(USING_JUCE),true)
  238. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_basics.posix64.a
  239. LIBS_POSIX64 += $(MODULEDIR)/juce_audio_processors.posix64.a
  240. LIBS_POSIX64 += $(MODULEDIR)/juce_data_structures.posix64.a
  241. LIBS_POSIX64 += $(MODULEDIR)/juce_core.posix64.a
  242. LIBS_POSIX64 += $(MODULEDIR)/juce_events.posix64.a
  243. LIBS_POSIX64 += $(MODULEDIR)/juce_graphics.posix64.a
  244. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a
  245. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  246. LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a
  247. endif
  248. endif
  249. posix64: $(LIBS_POSIX64)
  250. $(MAKE) -C source/bridges-plugin posix64
  251. $(MAKE) -C source/discovery posix64
  252. # ---------------------------------------------------------------------------------------------------------------------
  253. # Binaries (win32)
  254. ifeq ($(BUILDING_FOR_WINE),true)
  255. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32e.a
  256. else
  257. LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32.a
  258. endif
  259. LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
  260. LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
  261. LIBS_WIN32 += $(MODULEDIR)/water.win32.a
  262. ifeq ($(USING_JUCE),true)
  263. LIBS_WIN32 += $(MODULEDIR)/juce_audio_basics.win32.a
  264. LIBS_WIN32 += $(MODULEDIR)/juce_audio_processors.win32.a
  265. LIBS_WIN32 += $(MODULEDIR)/juce_data_structures.win32.a
  266. LIBS_WIN32 += $(MODULEDIR)/juce_core.win32.a
  267. LIBS_WIN32 += $(MODULEDIR)/juce_events.win32.a
  268. LIBS_WIN32 += $(MODULEDIR)/juce_graphics.win32.a
  269. LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a
  270. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  271. LIBS_WIN32 += $(MODULEDIR)/juce_gui_extra.win32.a
  272. endif
  273. endif
  274. win32r: $(LIBS_WIN32)
  275. $(MAKE) -C source/bridges-plugin win32
  276. $(MAKE) -C source/discovery win32
  277. win32: $(LIBS_WIN32)
  278. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win32
  279. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win32
  280. # ---------------------------------------------------------------------------------------------------------------------
  281. # Binaries (win64)
  282. ifeq ($(BUILDING_FOR_WINE),true)
  283. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64e.a
  284. else
  285. LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64.a
  286. endif
  287. LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
  288. LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
  289. LIBS_WIN64 += $(MODULEDIR)/water.win64.a
  290. ifeq ($(USING_JUCE),true)
  291. LIBS_WIN64 += $(MODULEDIR)/juce_audio_basics.win64.a
  292. LIBS_WIN64 += $(MODULEDIR)/juce_audio_processors.win64.a
  293. LIBS_WIN64 += $(MODULEDIR)/juce_data_structures.win64.a
  294. LIBS_WIN64 += $(MODULEDIR)/juce_core.win64.a
  295. LIBS_WIN64 += $(MODULEDIR)/juce_events.win64.a
  296. LIBS_WIN64 += $(MODULEDIR)/juce_graphics.win64.a
  297. LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
  298. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  299. LIBS_WIN64 += $(MODULEDIR)/juce_gui_extra.win64.a
  300. endif
  301. endif
  302. win64r: $(LIBS_WIN64)
  303. $(MAKE) -C source/bridges-plugin win64
  304. $(MAKE) -C source/discovery win64
  305. win64: $(LIBS_WIN64)
  306. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
  307. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
  308. # ---------------------------------------------------------------------------------------------------------------------
  309. # Binaries (wine)
  310. wine32:
  311. $(MAKE) -C source/jackbridge wine32
  312. cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(CURDIR)/bin/jackbridge-wine32.dll
  313. wine64:
  314. $(MAKE) -C source/jackbridge wine64
  315. cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll
  316. # ---------------------------------------------------------------------------------------------------------------------
  317. clean:
  318. $(MAKE) clean -C source/backend
  319. $(MAKE) clean -C source/bridges-plugin
  320. $(MAKE) clean -C source/bridges-ui
  321. $(MAKE) clean -C source/discovery
  322. $(MAKE) clean -C source/frontend
  323. $(MAKE) clean -C source/interposer
  324. $(MAKE) clean -C source/libjack
  325. $(MAKE) clean -C source/modules
  326. $(MAKE) clean -C source/native-plugins
  327. $(MAKE) clean -C source/plugin
  328. $(MAKE) clean -C source/tests
  329. $(MAKE) clean -C source/theme
  330. rm -f *~ source/*~
  331. distclean: clean
  332. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  333. rm -rf build build-lv2
  334. cpp:
  335. $(MAKE) CPPMODE=true
  336. debug:
  337. $(MAKE) DEBUG=true
  338. doxygen:
  339. $(MAKE) doxygen -C source/backend
  340. tests:
  341. $(MAKE) -C source/tests
  342. stoat:
  343. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  344. # stoat --recursive ./build/ \
  345. # --suppression ./data/stoat-supression.txt \
  346. # --whitelist ./data/stoat-whitelist.txt \
  347. # --graph-view ./data/stoat-callgraph.png
  348. # ---------------------------------------------------------------------------------------------------------------------
  349. install_main:
  350. # Create directories
  351. install -d $(DESTDIR)$(BINDIR)
  352. ifeq ($(LINUX),true)
  353. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  354. else
  355. install -d $(DESTDIR)$(LIBDIR)/carla
  356. endif
  357. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  358. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  359. ifeq ($(LINUX),true)
  360. ifeq ($(HAVE_JACK),true)
  361. ifeq ($(JACKBRIDGE_DIRECT),true)
  362. install -d $(DESTDIR)$(JACK_LIBDIR)
  363. endif
  364. endif
  365. endif
  366. ifeq ($(HAVE_PYQT),true)
  367. # Create directories (gui)
  368. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  369. install -d $(DESTDIR)$(DATADIR)/applications
  370. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  371. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  372. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  373. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  374. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  375. install -d $(DESTDIR)$(DATADIR)/mime/packages
  376. install -d $(DESTDIR)$(DATADIR)/carla/resources
  377. install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
  378. install -d $(DESTDIR)$(DATADIR)/carla/modgui
  379. install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
  380. install -d $(DESTDIR)$(DATADIR)/carla/widgets
  381. endif
  382. # -------------------------------------------------------------------------------------------------------------
  383. # Install script files (non-gui)
  384. install -m 755 \
  385. data/carla-single \
  386. $(DESTDIR)$(BINDIR)
  387. # Adjust PREFIX value in script files (non-gui)
  388. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  389. $(DESTDIR)$(BINDIR)/carla-single
  390. # Install backend libs
  391. install -m 644 \
  392. bin/libcarla_*.* \
  393. $(DESTDIR)$(LIBDIR)/carla
  394. # Install other binaries
  395. install -m 755 \
  396. bin/*bridge-* \
  397. bin/carla-discovery-* \
  398. $(DESTDIR)$(LIBDIR)/carla
  399. ifeq ($(LINUX),true)
  400. ifeq ($(HAVE_JACK),true)
  401. ifeq ($(JACKBRIDGE_DIRECT),true)
  402. # Install internal jack client
  403. ln -sf \
  404. $(LIBDIR)/carla/libcarla_standalone2.so \
  405. $(DESTDIR)$(JACK_LIBDIR)/carla.so
  406. endif
  407. endif
  408. ifneq ($(JACKBRIDGE_DIRECT),true)
  409. # Install custom libjack
  410. install -m 755 \
  411. bin/jack/libjack.so.0 \
  412. $(DESTDIR)$(LIBDIR)/carla/jack
  413. endif
  414. endif
  415. # Install pkg-config files
  416. install -m 644 \
  417. data/*.pc \
  418. $(DESTDIR)$(LIBDIR)/pkgconfig
  419. # Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files
  420. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  421. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  422. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  423. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  424. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  425. sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
  426. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  427. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  428. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  429. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  430. sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  431. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  432. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  433. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  434. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  435. # Install headers
  436. install -m 644 \
  437. source/backend/CarlaBackend.h \
  438. source/backend/CarlaHost.h \
  439. source/backend/CarlaUtils.h \
  440. source/backend/CarlaEngine.hpp \
  441. source/backend/CarlaPlugin.hpp \
  442. source/includes/CarlaNative.h \
  443. $(DESTDIR)$(INCLUDEDIR)/carla
  444. install -m 644 \
  445. source/includes/CarlaDefines.h \
  446. source/includes/CarlaMIDI.h \
  447. source/includes/CarlaNative.h \
  448. source/includes/CarlaNativePlugin.h \
  449. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  450. # -------------------------------------------------------------------------------------------------------------
  451. ifeq ($(HAVE_PYQT),true)
  452. ifneq ($(CPPMODE),true)
  453. # Install script files (gui)
  454. install -m 755 \
  455. data/carla \
  456. data/carla-database \
  457. data/carla-jack-multi \
  458. data/carla-jack-single \
  459. data/carla-jack-patchbayplugin \
  460. data/carla-osc-gui \
  461. data/carla-patchbay \
  462. data/carla-rack \
  463. data/carla-settings \
  464. $(DESTDIR)$(BINDIR)
  465. # Adjust PREFIX value in script files (gui)
  466. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  467. $(DESTDIR)$(BINDIR)/carla \
  468. $(DESTDIR)$(BINDIR)/carla-database \
  469. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  470. $(DESTDIR)$(BINDIR)/carla-jack-single \
  471. $(DESTDIR)$(BINDIR)/carla-jack-patchbayplugin \
  472. $(DESTDIR)$(BINDIR)/carla-osc-gui \
  473. $(DESTDIR)$(BINDIR)/carla-patchbay \
  474. $(DESTDIR)$(BINDIR)/carla-rack \
  475. $(DESTDIR)$(BINDIR)/carla-settings
  476. ifeq ($(HAVE_LIBLO),true)
  477. install -m 755 \
  478. data/carla-control \
  479. $(DESTDIR)$(BINDIR)
  480. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  481. $(DESTDIR)$(BINDIR)/carla-control
  482. endif
  483. # Install the real modgui bridge
  484. install -m 755 \
  485. data/carla-bridge-lv2-modgui \
  486. $(DESTDIR)$(LIBDIR)/carla
  487. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  488. $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  489. # Install frontend
  490. install -m 644 \
  491. source/frontend/carla \
  492. source/frontend/carla-control \
  493. source/frontend/carla-jack-multi \
  494. source/frontend/carla-jack-single \
  495. source/frontend/carla-patchbay \
  496. source/frontend/carla-rack \
  497. source/frontend/*.py \
  498. $(DESTDIR)$(DATADIR)/carla/
  499. install -m 644 \
  500. source/frontend/modgui/*.py \
  501. $(DESTDIR)$(DATADIR)/carla/modgui/
  502. install -m 644 \
  503. source/frontend/patchcanvas/*.py \
  504. $(DESTDIR)$(DATADIR)/carla/patchcanvas/
  505. install -m 644 \
  506. source/frontend/widgets/*.py \
  507. $(DESTDIR)$(DATADIR)/carla/widgets/
  508. # Adjust LIBDIR and DATADIR value in python code
  509. sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  510. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  511. sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  512. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  513. # Install resources (gui)
  514. install -m 755 \
  515. bin/resources/carla-plugin \
  516. bin/resources/carla-plugin-patchbay \
  517. bin/resources/*-ui \
  518. $(DESTDIR)$(DATADIR)/carla/resources
  519. endif # CPPMODE
  520. ifeq ($(HAVE_THEME),true)
  521. # Install theme
  522. install -m 644 \
  523. bin/styles/* \
  524. $(DESTDIR)$(LIBDIR)/carla/styles
  525. endif
  526. # Install desktop files
  527. install -m 644 data/desktop/carla.desktop $(DESTDIR)$(DATADIR)/applications
  528. install -m 644 data/desktop/carla-rack.desktop $(DESTDIR)$(DATADIR)/applications
  529. install -m 644 data/desktop/carla-patchbay.desktop $(DESTDIR)$(DATADIR)/applications
  530. install -m 644 data/desktop/carla-jack-single.desktop $(DESTDIR)$(DATADIR)/applications
  531. install -m 644 data/desktop/carla-jack-multi.desktop $(DESTDIR)$(DATADIR)/applications
  532. ifeq ($(HAVE_LIBLO),true)
  533. install -m 644 data/desktop/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  534. endif
  535. # Install mime package
  536. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  537. # Install icons, 16x16
  538. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  539. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/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) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
  554. $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
  555. $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
  556. $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  557. $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  558. $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  559. $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  560. $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  561. $(LINK) ../carla_host_control.py $(DESTDIR)$(DATADIR)/carla/resources
  562. $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  563. $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  564. $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  565. $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  566. $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  567. $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  568. $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  569. $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  570. $(LINK) ../ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources
  571. $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  572. $(LINK) ../ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  573. $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  574. $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  575. $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  576. $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  577. $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  578. $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  579. $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  580. $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  581. $(LINK) ../ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  582. $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  583. $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  584. $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  585. $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  586. # Install translations
  587. $(foreach l,$(I18N_LANGUAGES),install -m 644 \
  588. source/frontend/translations/carla_$(l).qm \
  589. $(DESTDIR)$(DATADIR)/carla/resources/translations/;)
  590. endif # HAVE_PYQT
  591. # -------------------------------------------------------------------------------------------------------------
  592. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  593. # Install lv2 plugin
  594. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  595. install -m 644 \
  596. bin/carla.lv2/carla.* \
  597. bin/carla.lv2/*.ttl \
  598. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  599. # Link binaries for lv2 plugin
  600. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  601. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  602. done
  603. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  604. endif
  605. ifeq ($(LINUX),true)
  606. # Link jack app bridge
  607. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  608. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  609. endif
  610. ifeq ($(HAVE_PYQT),true)
  611. # Link resources for lv2 plugin
  612. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  613. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  614. # Link styles for lv2 plugin
  615. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  616. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  617. endif
  618. # -------------------------------------------------------------------------------------------------------------
  619. ifneq ($(HAIKU),true)
  620. ifeq ($(HAVE_PYQT),true)
  621. # Install vst plugin
  622. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  623. install -m 644 \
  624. bin/CarlaRack*.* \
  625. bin/CarlaPatchbay*.* \
  626. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  627. # Link binaries for vst plugin
  628. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  629. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  630. done
  631. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  632. # Link jack app bridge
  633. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  634. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  635. # Link resources for vst plugin
  636. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  637. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  638. # Link styles for vst plugin
  639. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  640. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  641. endif
  642. endif
  643. # -------------------------------------------------------------------------------------------------------------
  644. ifneq ($(HAVE_PYQT),true)
  645. # Remove gui files for non-gui build
  646. rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  647. rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
  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 ($(HAVE_DIST),true)
  681. include Makefile.dist.mk
  682. else
  683. dist:
  684. endif
  685. include Makefile.print.mk
  686. # ---------------------------------------------------------------------------------------------------------------------
  687. .FORCE:
  688. .PHONY: .FORCE
  689. # ---------------------------------------------------------------------------------------------------------------------