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.

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