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.

137 lines
3.3KB

  1. #!/usr/bin/make -f
  2. # Makefile for DISTRHO Plugins #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. include dpf/Makefile.base.mk
  7. all: cardinal carla deps dgl plugins gen resources
  8. # --------------------------------------------------------------
  9. # Build config
  10. PREFIX ?= /usr/local
  11. DESTDIR ?=
  12. SYSDEPS ?= false
  13. # --------------------------------------------------------------
  14. # Carla config
  15. CARLA_EXTRA_ARGS = \
  16. HAVE_FFMPEG=false \
  17. HAVE_FLUIDSYNTH=false \
  18. HAVE_LIBMAGIC=false \
  19. HAVE_SNDFILE=false \
  20. USING_JUCE=false \
  21. USING_JUCE_GUI_EXTRA=false
  22. # --------------------------------------------------------------
  23. # Check for system-wide dependencies
  24. ifeq ($(SYSDEPS),true)
  25. ifneq ($(shell pkg-config --exists jansson && echo true),true)
  26. $(error jansson dependency not installed/available)
  27. endif
  28. ifneq ($(shell pkg-config --exists libarchive && echo true),true)
  29. $(error libarchive dependency not installed/available)
  30. endif
  31. ifneq ($(shell pkg-config --exists samplerate && echo true),true)
  32. $(error samplerate dependency not installed/available)
  33. endif
  34. ifneq ($(shell pkg-config --exists speexdsp && echo true),true)
  35. $(error speexdsp dependency not installed/available)
  36. endif
  37. endif
  38. # --------------------------------------------------------------
  39. # Check for X11+OpenGL dependencies (unless headless build)
  40. ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true)
  41. ifneq ($(HEADLESS),true)
  42. ifneq ($(HAVE_OPENGL),true)
  43. $(error X11 dependency not installed/available)
  44. endif
  45. ifneq ($(HAVE_X11),true)
  46. $(error X11 dependency not installed/available)
  47. endif
  48. ifneq ($(HAVE_XEXT),true)
  49. $(warning Xext dependency not installed/available)
  50. endif
  51. ifneq ($(HAVE_XRANDR),true)
  52. $(warning Xrandr dependency not installed/available)
  53. endif
  54. endif
  55. endif
  56. # --------------------------------------------------------------
  57. cardinal: carla deps dgl plugins
  58. $(MAKE) all -C src $(CARLA_EXTRA_ARGS)
  59. carla:
  60. $(MAKE) plugin -C carla $(CARLA_EXTRA_ARGS) \
  61. CAN_GENERATE_LV2_TTL=false \
  62. STATIC_PLUGIN_TARGET=true
  63. deps:
  64. ifneq ($(SYSDEPS),true)
  65. $(MAKE) all -C deps
  66. endif
  67. dgl:
  68. ifneq ($(HEADLESS),true)
  69. $(MAKE) -C dpf/dgl opengl USE_NANOVG_FBO=true
  70. endif
  71. plugins: deps
  72. $(MAKE) all -C plugins
  73. resources: cardinal
  74. $(MAKE) resources -C plugins
  75. ifneq ($(CROSS_COMPILING),true)
  76. gen: cardinal resources dpf/utils/lv2_ttl_generator
  77. @$(CURDIR)/dpf/utils/generate-ttl.sh
  78. dpf/utils/lv2_ttl_generator:
  79. $(MAKE) -C dpf/utils/lv2-ttl-generator
  80. else
  81. gen:
  82. endif
  83. # --------------------------------------------------------------
  84. clean:
  85. $(MAKE) distclean -C carla
  86. $(MAKE) clean -C deps
  87. $(MAKE) clean -C dpf/dgl
  88. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  89. $(MAKE) clean -C plugins
  90. $(MAKE) clean -C src
  91. rm -rf bin build
  92. # --------------------------------------------------------------
  93. install:
  94. install -d $(DESTDIR)$(PREFIX)/bin
  95. install -d $(DESTDIR)$(PREFIX)/lib/lv2
  96. install -d $(DESTDIR)$(PREFIX)/lib/vst
  97. install -d $(DESTDIR)$(PREFIX)/lib/vst3
  98. install -d $(DESTDIR)$(PREFIX)/share/Cardinal
  99. cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/
  100. cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/
  101. cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
  102. install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  103. cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/
  104. # --------------------------------------------------------------
  105. .PHONY: carla deps plugins