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.

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