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.

106 lines
3.0KB

  1. #!/usr/bin/make -f
  2. # Makefile for native-plugins #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. CWDE=..
  8. EXTERNAL=external/
  9. MODULENAME=native-plugins
  10. include ../modules/Makefile.mk
  11. # ---------------------------------------------------------------------------------------------------------------------
  12. BUILD_C_FLAGS += -I..
  13. BUILD_CXX_FLAGS += -I.. -I$(CWD)/modules
  14. # ---------------------------------------------------------------------------------------------------------------------
  15. # Set targets
  16. TARGETS = \
  17. $(MODULEDIR)/$(MODULENAME).all.a \
  18. $(MODULEDIR)/$(MODULENAME).base.a
  19. # ---------------------------------------------------------------------------------------------------------------------
  20. # Set objects
  21. # ---------------------------------------------------------------------------------------------------------------------
  22. # Simple plugins
  23. OBJS = \
  24. $(OBJDIR)/bypass.c.o \
  25. $(OBJDIR)/lfo.c.o \
  26. $(OBJDIR)/midi-channel-filter.c.o \
  27. $(OBJDIR)/midi-gain.c.o \
  28. $(OBJDIR)/midi-join.c.o \
  29. $(OBJDIR)/midi-split.c.o \
  30. $(OBJDIR)/midi-through.c.o \
  31. $(OBJDIR)/midi-transpose.c.o \
  32. $(OBJDIR)/audio-file.cpp.o \
  33. $(OBJDIR)/bigmeter.cpp.o \
  34. $(OBJDIR)/midi-file.cpp.o \
  35. $(OBJDIR)/midi-pattern.cpp.o \
  36. $(OBJDIR)/notes.cpp.o
  37. OBJS_base = \
  38. $(OBJDIR)/_all.base.c.o \
  39. $(OBJDIR)/_data.base.cpp.o \
  40. $(OBJS)
  41. OBJS_all = \
  42. $(OBJDIR)/_all.all.c.o \
  43. $(OBJDIR)/_data.all.cpp.o \
  44. $(OBJS)
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. # Include external plugins, if present
  47. ifeq ($(EXTERNAL_PLUGINS),true)
  48. include external/Makefile
  49. endif
  50. # ---------------------------------------------------------------------------------------------------------------------
  51. all: $(TARGETS)
  52. # ---------------------------------------------------------------------------------------------------------------------
  53. clean:
  54. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) $(TARGETS)
  55. debug:
  56. $(MAKE) DEBUG=true
  57. # ---------------------------------------------------------------------------------------------------------------------
  58. $(MODULEDIR)/$(MODULENAME).all.a: $(OBJS_all)
  59. -@mkdir -p $(MODULEDIR)
  60. @echo "Creating $(MODULENAME).all.a"
  61. @rm -f $@
  62. @$(AR) crs $@ $^
  63. $(MODULEDIR)/$(MODULENAME).base.a: $(OBJS_base)
  64. -@mkdir -p $(MODULEDIR)
  65. @echo "Creating $(MODULENAME).base.a"
  66. @rm -f $@
  67. @$(AR) crs $@ $^
  68. # ---------------------------------------------------------------------------------------------------------------------
  69. $(OBJDIR)/%.c.o: %.c
  70. -@mkdir -p $(OBJDIR)
  71. @echo "Compiling $<"
  72. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  73. $(OBJDIR)/%.cpp.o: %.cpp
  74. -@mkdir -p $(OBJDIR)
  75. @echo "Compiling $<"
  76. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  77. # ---------------------------------------------------------------------------------------------------------------------
  78. -include $(OBJS:%.o=%.d)
  79. # ---------------------------------------------------------------------------------------------------------------------