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.

837 lines
27KB

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