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.

97 lines
2.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 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 dpendency not installed/available)
  18. endif
  19. ifneq ($(shell pkg-config --exists libarchive && echo true),true)
  20. $(error libarchive dpendency not installed/available)
  21. endif
  22. ifneq ($(shell pkg-config --exists samplerate && echo true),true)
  23. $(error samplerate dpendency not installed/available)
  24. endif
  25. ifneq ($(shell pkg-config --exists speexdsp && echo true),true)
  26. $(error speexdsp dpendency not installed/available)
  27. endif
  28. endif
  29. # --------------------------------------------------------------
  30. cardinal: deps dgl plugins
  31. $(MAKE) all -C src
  32. deps:
  33. ifneq ($(SYSDEPS),true)
  34. $(MAKE) all -C deps
  35. endif
  36. dgl:
  37. $(MAKE) USE_NANOVG_FBO=true -C dpf/dgl opengl
  38. # $(MAKE) opengl -C dpf/dgl USE_NANOVG_FBO=true
  39. plugins: deps
  40. $(MAKE) all -C plugins
  41. resources: cardinal
  42. $(MAKE) resources -C plugins
  43. ifneq ($(CROSS_COMPILING),true)
  44. gen: cardinal resources dpf/utils/lv2_ttl_generator
  45. @$(CURDIR)/dpf/utils/generate-ttl.sh
  46. dpf/utils/lv2_ttl_generator:
  47. $(MAKE) -C dpf/utils/lv2-ttl-generator
  48. else
  49. gen:
  50. endif
  51. # --------------------------------------------------------------
  52. clean:
  53. $(MAKE) clean -C deps
  54. $(MAKE) clean -C dpf/dgl
  55. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  56. $(MAKE) clean -C plugins
  57. $(MAKE) clean -C src
  58. rm -rf bin build
  59. # --------------------------------------------------------------
  60. install:
  61. install -d $(DESTDIR)$(PREFIX)/bin
  62. install -d $(DESTDIR)$(PREFIX)/lib/lv2
  63. install -d $(DESTDIR)$(PREFIX)/lib/vst
  64. install -d $(DESTDIR)$(PREFIX)/lib/vst3
  65. install -d $(DESTDIR)$(PREFIX)/share/Cardinal
  66. cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/
  67. cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/
  68. cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
  69. install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  70. cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/
  71. # --------------------------------------------------------------
  72. .PHONY: deps plugins