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.

125 lines
3.0KB

  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. # Check for system-wide dependencies
  15. ifeq ($(SYSDEPS),true)
  16. ifneq ($(shell pkg-config --exists jansson && echo true),true)
  17. $(error jansson dependency not installed/available)
  18. endif
  19. ifneq ($(shell pkg-config --exists libarchive && echo true),true)
  20. $(error libarchive dependency not installed/available)
  21. endif
  22. ifneq ($(shell pkg-config --exists samplerate && echo true),true)
  23. $(error samplerate dependency not installed/available)
  24. endif
  25. ifneq ($(shell pkg-config --exists speexdsp && echo true),true)
  26. $(error speexdsp dependency not installed/available)
  27. endif
  28. endif
  29. # --------------------------------------------------------------
  30. # Check for X11+OpenGL dependencies (unless headless build)
  31. ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true)
  32. ifneq ($(HEADLESS),true)
  33. ifneq ($(HAVE_OPENGL),true)
  34. $(error X11 dependency not installed/available)
  35. endif
  36. ifneq ($(HAVE_X11),true)
  37. $(error X11 dependency not installed/available)
  38. endif
  39. ifneq ($(HAVE_XEXT),true)
  40. $(warning Xext dependency not installed/available)
  41. endif
  42. ifneq ($(HAVE_XRANDR),true)
  43. $(warning Xrandr dependency not installed/available)
  44. endif
  45. endif
  46. endif
  47. # --------------------------------------------------------------
  48. cardinal: deps dgl plugins
  49. $(MAKE) all -C src
  50. carla:
  51. $(MAKE) -C carla plugin \
  52. CAN_GENERATE_LV2_TTL=false \
  53. STATIC_PLUGIN_TARGET=true
  54. deps:
  55. ifneq ($(SYSDEPS),true)
  56. $(MAKE) all -C deps
  57. endif
  58. dgl:
  59. ifneq ($(HEADLESS),true)
  60. $(MAKE) -C dpf/dgl opengl USE_NANOVG_FBO=true
  61. endif
  62. plugins: deps
  63. $(MAKE) all -C plugins
  64. resources: cardinal
  65. $(MAKE) resources -C plugins
  66. ifneq ($(CROSS_COMPILING),true)
  67. gen: cardinal resources dpf/utils/lv2_ttl_generator
  68. @$(CURDIR)/dpf/utils/generate-ttl.sh
  69. dpf/utils/lv2_ttl_generator:
  70. $(MAKE) -C dpf/utils/lv2-ttl-generator
  71. else
  72. gen:
  73. endif
  74. # --------------------------------------------------------------
  75. clean:
  76. $(MAKE) clean -C deps
  77. $(MAKE) clean -C dpf/dgl
  78. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  79. $(MAKE) clean -C plugins
  80. $(MAKE) clean -C src
  81. rm -rf bin build
  82. # --------------------------------------------------------------
  83. install:
  84. install -d $(DESTDIR)$(PREFIX)/bin
  85. install -d $(DESTDIR)$(PREFIX)/lib/lv2
  86. install -d $(DESTDIR)$(PREFIX)/lib/vst
  87. install -d $(DESTDIR)$(PREFIX)/lib/vst3
  88. install -d $(DESTDIR)$(PREFIX)/share/Cardinal
  89. cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/
  90. cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/
  91. cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
  92. install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  93. cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/
  94. # --------------------------------------------------------------
  95. .PHONY: carla deps plugins