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.

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