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.

144 lines
3.4KB

  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. else
  55. CARLA_EXTRA_ARGS += HAVE_OPENGL=false
  56. CARLA_EXTRA_ARGS += HAVE_X11=false
  57. CARLA_EXTRA_ARGS += HAVE_XEXT=false
  58. CARLA_EXTRA_ARGS += HAVE_XRANDR=false
  59. endif
  60. endif
  61. # --------------------------------------------------------------
  62. cardinal: carla deps dgl plugins
  63. $(MAKE) all -C src $(CARLA_EXTRA_ARGS)
  64. carla:
  65. $(MAKE) plugin -C carla $(CARLA_EXTRA_ARGS) \
  66. CAN_GENERATE_LV2_TTL=false \
  67. STATIC_PLUGIN_TARGET=true
  68. deps:
  69. ifneq ($(SYSDEPS),true)
  70. $(MAKE) all -C deps
  71. endif
  72. dgl:
  73. ifneq ($(HEADLESS),true)
  74. $(MAKE) -C dpf/dgl opengl USE_NANOVG_FBO=true
  75. endif
  76. plugins: deps
  77. $(MAKE) all -C plugins
  78. resources: cardinal
  79. $(MAKE) resources -C plugins
  80. ifneq ($(CROSS_COMPILING),true)
  81. gen: cardinal resources dpf/utils/lv2_ttl_generator
  82. @$(CURDIR)/dpf/utils/generate-ttl.sh
  83. dpf/utils/lv2_ttl_generator:
  84. $(MAKE) -C dpf/utils/lv2-ttl-generator
  85. else
  86. gen:
  87. endif
  88. # --------------------------------------------------------------
  89. clean:
  90. $(MAKE) distclean -C carla
  91. $(MAKE) clean -C deps
  92. $(MAKE) clean -C dpf/dgl
  93. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  94. $(MAKE) clean -C plugins
  95. $(MAKE) clean -C src
  96. rm -rf bin build
  97. # --------------------------------------------------------------
  98. install:
  99. install -d $(DESTDIR)$(PREFIX)/bin
  100. install -d $(DESTDIR)$(PREFIX)/lib/lv2
  101. install -d $(DESTDIR)$(PREFIX)/lib/vst
  102. install -d $(DESTDIR)$(PREFIX)/lib/vst3
  103. install -d $(DESTDIR)$(PREFIX)/share/Cardinal
  104. cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/
  105. cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/
  106. cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
  107. install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  108. cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/
  109. # --------------------------------------------------------------
  110. .PHONY: carla deps plugins