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.

120 lines
2.9KB

  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 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. deps:
  51. ifneq ($(SYSDEPS),true)
  52. $(MAKE) all -C deps
  53. endif
  54. dgl:
  55. ifneq ($(HEADLESS),true)
  56. $(MAKE) -C dpf/dgl opengl USE_NANOVG_FBO=true
  57. endif
  58. plugins: deps
  59. $(MAKE) all -C plugins
  60. resources: cardinal
  61. $(MAKE) resources -C plugins
  62. ifneq ($(CROSS_COMPILING),true)
  63. gen: cardinal resources dpf/utils/lv2_ttl_generator
  64. @$(CURDIR)/dpf/utils/generate-ttl.sh
  65. dpf/utils/lv2_ttl_generator:
  66. $(MAKE) -C dpf/utils/lv2-ttl-generator
  67. else
  68. gen:
  69. endif
  70. # --------------------------------------------------------------
  71. clean:
  72. $(MAKE) clean -C deps
  73. $(MAKE) clean -C dpf/dgl
  74. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  75. $(MAKE) clean -C plugins
  76. $(MAKE) clean -C src
  77. rm -rf bin build
  78. # --------------------------------------------------------------
  79. install:
  80. install -d $(DESTDIR)$(PREFIX)/bin
  81. install -d $(DESTDIR)$(PREFIX)/lib/lv2
  82. install -d $(DESTDIR)$(PREFIX)/lib/vst
  83. install -d $(DESTDIR)$(PREFIX)/lib/vst3
  84. install -d $(DESTDIR)$(PREFIX)/share/Cardinal
  85. cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/
  86. cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/
  87. cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
  88. install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  89. cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/
  90. # --------------------------------------------------------------
  91. .PHONY: deps plugins