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.

100 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. ifeq ($(MACOS),true)
  47. @$(CURDIR)/dpf/utils/generate-vst-bundles.sh
  48. endif
  49. dpf/utils/lv2_ttl_generator:
  50. $(MAKE) -C dpf/utils/lv2-ttl-generator
  51. else
  52. gen:
  53. endif
  54. # --------------------------------------------------------------
  55. clean:
  56. $(MAKE) clean -C deps
  57. $(MAKE) clean -C dpf/dgl
  58. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  59. $(MAKE) clean -C plugins
  60. $(MAKE) clean -C src
  61. rm -rf bin build
  62. # --------------------------------------------------------------
  63. install:
  64. install -d $(DESTDIR)$(PREFIX)/bin
  65. install -d $(DESTDIR)$(PREFIX)/lib/lv2
  66. install -d $(DESTDIR)$(PREFIX)/lib/vst
  67. install -d $(DESTDIR)$(PREFIX)/lib/vst3
  68. install -d $(DESTDIR)$(PREFIX)/share/Cardinal
  69. cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/
  70. cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/
  71. cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
  72. install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  73. cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/
  74. # --------------------------------------------------------------
  75. .PHONY: deps plugins