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.

826 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.1
  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. ifeq ($(CC),x86_64-w64-mingw32-gcc)
  248. $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ -C source/bridges-plugin win32
  249. $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ -C source/discovery win32
  250. else
  251. $(MAKE) -C source/bridges-plugin win32
  252. $(MAKE) -C source/discovery win32
  253. endif
  254. # ---------------------------------------------------------------------------------------------------------------------
  255. # Binaries (win64)
  256. LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
  257. LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
  258. LIBS_WIN64 += $(MODULEDIR)/water.win64.a
  259. ifeq ($(USING_JUCE),true)
  260. LIBS_WIN64 += $(MODULEDIR)/juce_audio_basics.win64.a
  261. LIBS_WIN64 += $(MODULEDIR)/juce_audio_processors.win64.a
  262. LIBS_WIN64 += $(MODULEDIR)/juce_data_structures.win64.a
  263. LIBS_WIN64 += $(MODULEDIR)/juce_core.win64.a
  264. LIBS_WIN64 += $(MODULEDIR)/juce_events.win64.a
  265. LIBS_WIN64 += $(MODULEDIR)/juce_graphics.win64.a
  266. LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
  267. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  268. LIBS_WIN64 += $(MODULEDIR)/juce_gui_extra.win64.a
  269. endif
  270. endif
  271. LIBS_WINE64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64e.a
  272. LIBS_RWIN64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64.a
  273. win64: $(LIBS_WINE64)
  274. $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
  275. $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
  276. win64r: $(LIBS_RWIN64)
  277. ifeq ($(CC),i686-w64-mingw32-gcc)
  278. $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/bridges-plugin win64
  279. $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/discovery win64
  280. else
  281. $(MAKE) -C source/bridges-plugin win64
  282. $(MAKE) -C source/discovery win64
  283. endif
  284. # ---------------------------------------------------------------------------------------------------------------------
  285. # Binaries (wine)
  286. wine32:
  287. $(MAKE) -C source/jackbridge wine32
  288. cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(CURDIR)/bin/jackbridge-wine32.dll
  289. wine64:
  290. $(MAKE) -C source/jackbridge wine64
  291. cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll
  292. # ---------------------------------------------------------------------------------------------------------------------
  293. clean:
  294. $(MAKE) clean -C source/backend
  295. $(MAKE) clean -C source/bridges-plugin
  296. $(MAKE) clean -C source/bridges-ui
  297. $(MAKE) clean -C source/discovery
  298. $(MAKE) clean -C source/frontend
  299. $(MAKE) clean -C source/interposer
  300. $(MAKE) clean -C source/libjack
  301. $(MAKE) clean -C source/modules
  302. $(MAKE) clean -C source/native-plugins
  303. $(MAKE) clean -C source/plugin
  304. $(MAKE) clean -C source/tests
  305. $(MAKE) clean -C source/theme
  306. rm -f *~ source/*~
  307. distclean: clean
  308. rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
  309. rm -rf build build-lv2
  310. cpp:
  311. $(MAKE) CPPMODE=true
  312. debug:
  313. $(MAKE) DEBUG=true
  314. doxygen:
  315. $(MAKE) doxygen -C source/backend
  316. tests:
  317. $(MAKE) -C source/tests
  318. stoat:
  319. stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
  320. # stoat --recursive ./build/ \
  321. # --suppression ./data/stoat-supression.txt \
  322. # --whitelist ./data/stoat-whitelist.txt \
  323. # --graph-view ./data/stoat-callgraph.png
  324. # ---------------------------------------------------------------------------------------------------------------------
  325. install_main:
  326. # Create directories
  327. install -d $(DESTDIR)$(BINDIR)
  328. install -d $(DESTDIR)$(DATADIR)/carla/resources
  329. ifeq ($(LINUX),true)
  330. install -d $(DESTDIR)$(LIBDIR)/carla/jack
  331. else
  332. install -d $(DESTDIR)$(LIBDIR)/carla
  333. endif
  334. install -d $(DESTDIR)$(LIBDIR)/pkgconfig
  335. install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
  336. ifeq ($(LINUX),true)
  337. ifeq ($(HAVE_JACK),true)
  338. ifeq ($(JACKBRIDGE_DIRECT),true)
  339. install -d $(DESTDIR)$(JACK_LIBDIR)
  340. endif
  341. endif
  342. endif
  343. ifeq ($(HAVE_PYQT),true)
  344. # Create directories (gui)
  345. install -d $(DESTDIR)$(LIBDIR)/carla/styles
  346. install -d $(DESTDIR)$(DATADIR)/applications
  347. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  348. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  349. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  350. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  351. install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  352. install -d $(DESTDIR)$(DATADIR)/mime/packages
  353. install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
  354. install -d $(DESTDIR)$(DATADIR)/carla/modgui
  355. install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
  356. install -d $(DESTDIR)$(DATADIR)/carla/widgets
  357. endif
  358. # -------------------------------------------------------------------------------------------------------------
  359. # Install script files (non-gui)
  360. install -m 755 \
  361. data/carla-single \
  362. $(DESTDIR)$(BINDIR)
  363. # Adjust PREFIX value in script files (non-gui)
  364. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  365. $(DESTDIR)$(BINDIR)/carla-single
  366. # Install backend libs
  367. install -m 644 \
  368. bin/libcarla_*.* \
  369. $(DESTDIR)$(LIBDIR)/carla
  370. # Install other binaries
  371. install -m 755 \
  372. bin/*bridge-* \
  373. bin/carla-discovery-* \
  374. $(DESTDIR)$(LIBDIR)/carla
  375. ifeq ($(LINUX),true)
  376. ifeq ($(HAVE_JACK),true)
  377. ifeq ($(JACKBRIDGE_DIRECT),true)
  378. # Install internal jack client
  379. ln -sf \
  380. $(LIBDIR)/carla/libcarla_standalone2.so \
  381. $(DESTDIR)$(JACK_LIBDIR)/carla.so
  382. endif
  383. endif
  384. ifneq ($(JACKBRIDGE_DIRECT),true)
  385. # Install custom libjack
  386. install -m 755 \
  387. bin/jack/libjack.so.0 \
  388. $(DESTDIR)$(LIBDIR)/carla/jack
  389. endif
  390. endif
  391. # Install pkg-config files
  392. install -m 644 \
  393. data/*.pc \
  394. $(DESTDIR)$(LIBDIR)/pkgconfig
  395. # Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files
  396. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  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. sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
  402. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  403. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  404. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  405. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  406. sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
  407. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
  408. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
  409. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
  410. $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  411. # Install headers
  412. install -m 644 \
  413. source/backend/CarlaBackend.h \
  414. source/backend/CarlaHost.h \
  415. source/backend/CarlaUtils.h \
  416. source/backend/CarlaEngine.hpp \
  417. source/backend/CarlaPlugin.hpp \
  418. source/includes/CarlaNative.h \
  419. $(DESTDIR)$(INCLUDEDIR)/carla
  420. install -m 644 \
  421. source/includes/CarlaDefines.h \
  422. source/includes/CarlaMIDI.h \
  423. source/includes/CarlaNative.h \
  424. source/includes/CarlaNativePlugin.h \
  425. $(DESTDIR)$(INCLUDEDIR)/carla/includes
  426. # -------------------------------------------------------------------------------------------------------------
  427. ifeq ($(HAVE_PYQT),true)
  428. ifneq ($(CPPMODE),true)
  429. # Install script files (gui)
  430. install -m 755 \
  431. data/carla \
  432. data/carla-database \
  433. data/carla-jack-multi \
  434. data/carla-jack-single \
  435. data/carla-jack-patchbayplugin \
  436. data/carla-osc-gui \
  437. data/carla-patchbay \
  438. data/carla-rack \
  439. data/carla-settings \
  440. $(DESTDIR)$(BINDIR)
  441. # Adjust PREFIX value in script files (gui)
  442. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  443. $(DESTDIR)$(BINDIR)/carla \
  444. $(DESTDIR)$(BINDIR)/carla-database \
  445. $(DESTDIR)$(BINDIR)/carla-jack-multi \
  446. $(DESTDIR)$(BINDIR)/carla-jack-single \
  447. $(DESTDIR)$(BINDIR)/carla-jack-patchbayplugin \
  448. $(DESTDIR)$(BINDIR)/carla-osc-gui \
  449. $(DESTDIR)$(BINDIR)/carla-patchbay \
  450. $(DESTDIR)$(BINDIR)/carla-rack \
  451. $(DESTDIR)$(BINDIR)/carla-settings
  452. ifeq ($(HAVE_LIBLO),true)
  453. install -m 755 \
  454. data/carla-control \
  455. $(DESTDIR)$(BINDIR)
  456. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  457. $(DESTDIR)$(BINDIR)/carla-control
  458. endif
  459. # Install the real modgui bridge
  460. install -m 755 \
  461. data/carla-bridge-lv2-modgui \
  462. $(DESTDIR)$(LIBDIR)/carla
  463. sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
  464. $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  465. # Install frontend
  466. install -m 644 \
  467. source/frontend/carla \
  468. source/frontend/carla-control \
  469. source/frontend/carla-jack-multi \
  470. source/frontend/carla-jack-single \
  471. source/frontend/carla-patchbay \
  472. source/frontend/carla-rack \
  473. source/frontend/*.py \
  474. $(DESTDIR)$(DATADIR)/carla/
  475. install -m 644 \
  476. source/frontend/modgui/*.py \
  477. $(DESTDIR)$(DATADIR)/carla/modgui/
  478. install -m 644 \
  479. source/frontend/patchcanvas/*.py \
  480. $(DESTDIR)$(DATADIR)/carla/patchcanvas/
  481. install -m 644 \
  482. source/frontend/widgets/*.py \
  483. $(DESTDIR)$(DATADIR)/carla/widgets/
  484. # Adjust LIBDIR and DATADIR value in python code
  485. sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
  486. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  487. sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
  488. $(DESTDIR)$(DATADIR)/carla/carla_shared.py
  489. # Install resources (gui)
  490. install -m 755 \
  491. bin/resources/carla-plugin \
  492. bin/resources/carla-plugin-patchbay \
  493. bin/resources/*-ui \
  494. $(DESTDIR)$(DATADIR)/carla/resources
  495. endif # CPPMODE
  496. ifeq ($(HAVE_THEME),true)
  497. # Install theme
  498. install -m 644 \
  499. bin/styles/* \
  500. $(DESTDIR)$(LIBDIR)/carla/styles
  501. endif
  502. # Install desktop files
  503. install -m 644 data/desktop/carla.desktop $(DESTDIR)$(DATADIR)/applications
  504. install -m 644 data/desktop/carla-rack.desktop $(DESTDIR)$(DATADIR)/applications
  505. install -m 644 data/desktop/carla-patchbay.desktop $(DESTDIR)$(DATADIR)/applications
  506. install -m 644 data/desktop/carla-jack-single.desktop $(DESTDIR)$(DATADIR)/applications
  507. install -m 644 data/desktop/carla-jack-multi.desktop $(DESTDIR)$(DATADIR)/applications
  508. ifeq ($(HAVE_LIBLO),true)
  509. install -m 644 data/desktop/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
  510. endif
  511. # Install mime package
  512. install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
  513. # Install icons, 16x16
  514. install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  515. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
  516. # Install icons, 48x48
  517. install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  518. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
  519. # Install icons, 128x128
  520. install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  521. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
  522. # Install icons, 256x256
  523. install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  524. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
  525. # Install icons, scalable
  526. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  527. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
  528. # Install resources (re-use python files)
  529. $(LINK) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
  530. $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
  531. $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
  532. $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
  533. $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
  534. $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
  535. $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  536. $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  537. $(LINK) ../carla_host_control.py $(DESTDIR)$(DATADIR)/carla/resources
  538. $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  539. $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
  540. $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
  541. $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
  542. $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
  543. $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
  544. $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
  545. $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
  546. $(LINK) ../ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources
  547. $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources
  548. $(LINK) ../ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources
  549. $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
  550. $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
  551. $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
  552. $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
  553. $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
  554. $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
  555. $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
  556. $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
  557. $(LINK) ../ui_carla_refresh.py $(DESTDIR)$(DATADIR)/carla/resources
  558. $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
  559. $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
  560. $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
  561. $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
  562. # Install translations
  563. $(foreach l,$(I18N_LANGUAGES),install -m 644 \
  564. source/frontend/translations/carla_$(l).qm \
  565. $(DESTDIR)$(DATADIR)/carla/resources/translations/;)
  566. endif # HAVE_PYQT
  567. # -------------------------------------------------------------------------------------------------------------
  568. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  569. # Install lv2 plugin
  570. install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  571. install -m 644 \
  572. bin/carla.lv2/carla.* \
  573. bin/carla.lv2/*.ttl \
  574. $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  575. # Link binaries for lv2 plugin
  576. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  577. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
  578. done
  579. rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
  580. ifeq ($(LINUX),true)
  581. # Link jack app bridge
  582. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  583. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
  584. endif
  585. endif # CAN_GENERATE_LV2_TTL
  586. ifeq ($(HAVE_PYQT),true)
  587. # Link resources for lv2 plugin
  588. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  589. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
  590. # Link styles for lv2 plugin
  591. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  592. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
  593. endif
  594. # -------------------------------------------------------------------------------------------------------------
  595. ifneq ($(HAIKU),true)
  596. ifeq ($(HAVE_PYQT),true)
  597. # Install vst plugin
  598. install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
  599. install -m 644 \
  600. bin/CarlaRack*.* \
  601. bin/CarlaPatchbay*.* \
  602. $(DESTDIR)$(LIBDIR)/vst/carla.vst
  603. # Link binaries for vst plugin
  604. @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
  605. $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
  606. done
  607. rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
  608. # Link jack app bridge
  609. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  610. $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
  611. # Link resources for vst plugin
  612. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  613. $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
  614. # Link styles for vst plugin
  615. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  616. $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
  617. endif
  618. endif
  619. # -------------------------------------------------------------------------------------------------------------
  620. ifneq ($(HAVE_PYQT),true)
  621. # Remove gui files for non-gui build
  622. rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
  623. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  624. rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
  625. endif
  626. endif
  627. # ---------------------------------------------------------------------------------------------------------------------
  628. ifneq ($(EXTERNAL_PLUGINS),true)
  629. install_external_plugins:
  630. endif
  631. install: install_main install_external_plugins
  632. # ---------------------------------------------------------------------------------------------------------------------
  633. uninstall:
  634. rm -f $(DESTDIR)$(BINDIR)/carla*
  635. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc
  636. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
  637. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
  638. rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
  639. rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
  640. rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
  641. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
  642. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
  643. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
  644. rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
  645. rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
  646. rm -rf $(DESTDIR)$(LIBDIR)/carla
  647. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
  648. rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
  649. rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
  650. rm -rf $(DESTDIR)$(DATADIR)/carla
  651. rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
  652. # ----------------------------------------------------------------------------------------------------------------------------
  653. ifeq ($(MACOS),true)
  654. ifneq ($(MACOS_OLD),true)
  655. HAVE_DIST = true
  656. endif
  657. endif
  658. ifeq ($(WIN32),true)
  659. HAVE_DIST = true
  660. endif
  661. ifeq ($(HAVE_DIST),true)
  662. include Makefile.dist.mk
  663. else
  664. dist:
  665. endif
  666. include Makefile.print.mk
  667. # ---------------------------------------------------------------------------------------------------------------------
  668. .FORCE:
  669. .PHONY: .FORCE
  670. # ---------------------------------------------------------------------------------------------------------------------