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.

878 lines
28KB

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