Audio plugin host https://kx.studio/carla
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.

142 lines
3.9KB

  1. #!/usr/bin/make -f
  2. # Makefile for native-plugins #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. CWDE=..
  8. MODULENAME=native-plugins
  9. include ../modules/Makefile.mk
  10. # ---------------------------------------------------------------------------------------------------------------------
  11. BUILD_C_FLAGS += -I..
  12. BUILD_CXX_FLAGS += -I.. -I$(CWD)/modules
  13. ifneq ($(HAIKU),true)
  14. ifneq ($(WASM),true)
  15. BUILD_CXX_FLAGS += -pthread
  16. endif
  17. endif
  18. # ---------------------------------------------------------------------------------------------------------------------
  19. # Set targets
  20. TARGETS = $(MODULEDIR)/$(MODULENAME).a
  21. BUNDLES = \
  22. $(MODULEDIR)/$(MODULENAME)_audiogain.a \
  23. $(MODULEDIR)/$(MODULENAME)_files.a \
  24. $(MODULEDIR)/$(MODULENAME)_miditools.a
  25. # ---------------------------------------------------------------------------------------------------------------------
  26. # Set objects
  27. OBJS = \
  28. $(OBJDIR)/_all.c.o \
  29. $(OBJDIR)/_data.cpp.o \
  30. $(OBJDIR)/audio-gain.c.o \
  31. $(OBJDIR)/bypass.c.o \
  32. $(OBJDIR)/cv-to-audio.c.o \
  33. $(OBJDIR)/lfo.c.o \
  34. $(OBJDIR)/midi-channel-filter.c.o \
  35. $(OBJDIR)/midi-channel-ab.c.o \
  36. $(OBJDIR)/midi-channelize.c.o \
  37. $(OBJDIR)/midi-gain.c.o \
  38. $(OBJDIR)/midi-join.c.o \
  39. $(OBJDIR)/midi-split.c.o \
  40. $(OBJDIR)/midi-to-cv.c.o \
  41. $(OBJDIR)/midi-through.c.o \
  42. $(OBJDIR)/midi-transpose.c.o \
  43. $(OBJDIR)/audio-file.cpp.o \
  44. $(OBJDIR)/bigmeter.cpp.o \
  45. $(OBJDIR)/midi-file.cpp.o \
  46. $(OBJDIR)/midi-pattern.cpp.o \
  47. $(OBJDIR)/notes.cpp.o \
  48. $(OBJDIR)/xycontroller.cpp.o
  49. OBJS_audiogain = \
  50. $(OBJDIR)/audio-gain.c.o
  51. OBJS_files = \
  52. $(OBJDIR)/audio-file.cpp.o \
  53. $(OBJDIR)/midi-file.cpp.o
  54. OBJS_miditools = \
  55. $(OBJDIR)/midi-channel-filter.c.o \
  56. $(OBJDIR)/midi-channel-ab.c.o \
  57. $(OBJDIR)/midi-channelize.c.o \
  58. $(OBJDIR)/midi-gain.c.o \
  59. $(OBJDIR)/midi-join.c.o \
  60. $(OBJDIR)/midi-split.c.o \
  61. $(OBJDIR)/midi-transpose.c.o
  62. # ---------------------------------------------------------------------------------------------------------------------
  63. # Include external plugins, if present
  64. ifeq ($(EXTERNAL_PLUGINS),true)
  65. ifneq (,$(wildcard external/Makefile.mk2))
  66. include external/Makefile.mk2
  67. else
  68. $(error External plugins build requested but submodule not present, cannot build)
  69. endif
  70. endif
  71. # ---------------------------------------------------------------------------------------------------------------------
  72. all: $(TARGETS)
  73. bundles: $(BUNDLES)
  74. # ---------------------------------------------------------------------------------------------------------------------
  75. clean:
  76. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) $(TARGETS)
  77. debug:
  78. $(MAKE) DEBUG=true
  79. # ---------------------------------------------------------------------------------------------------------------------
  80. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  81. -@mkdir -p $(MODULEDIR)
  82. @echo "Creating $(MODULENAME).a"
  83. $(SILENT)rm -f $@
  84. $(SILENT)$(AR) crs $@ $^
  85. $(MODULEDIR)/$(MODULENAME)_audiogain.a: $(OBJS_audiogain)
  86. -@mkdir -p $(MODULEDIR)
  87. @echo "Creating $(MODULENAME)_audiogain.a"
  88. $(SILENT)rm -f $@
  89. $(SILENT)$(AR) crs $@ $^
  90. $(MODULEDIR)/$(MODULENAME)_files.a: $(OBJS_files)
  91. -@mkdir -p $(MODULEDIR)
  92. @echo "Creating $(MODULENAME)_files.a"
  93. $(SILENT)rm -f $@
  94. $(SILENT)$(AR) crs $@ $^
  95. $(MODULEDIR)/$(MODULENAME)_miditools.a: $(OBJS_miditools)
  96. -@mkdir -p $(MODULEDIR)
  97. @echo "Creating $(MODULENAME)_miditools.a"
  98. $(SILENT)rm -f $@
  99. $(SILENT)$(AR) crs $@ $^
  100. # ---------------------------------------------------------------------------------------------------------------------
  101. $(OBJDIR)/%.c.o: %.c
  102. -@mkdir -p $(OBJDIR)
  103. @echo "Compiling $<"
  104. $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  105. $(OBJDIR)/%.cpp.o: %.cpp
  106. -@mkdir -p $(OBJDIR)
  107. @echo "Compiling $<"
  108. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  109. # ---------------------------------------------------------------------------------------------------------------------
  110. -include $(OBJS:%.o=%.d)
  111. # ---------------------------------------------------------------------------------------------------------------------