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.

125 lines
3.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-plugin #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. include ../Makefile.mk
  8. # Workaround GCC bug
  9. ifeq ($(TESTBUILD),true)
  10. ifeq ($(USING_JUCE),true)
  11. BUILD_CXX_FLAGS += -Wno-undef
  12. endif
  13. endif
  14. ifeq ($(USING_JUCE),true)
  15. ifeq ($(WINDOWS),true)
  16. BUILD_CXX_FLAGS += -I$(CWD)/modules/mingw-std-threads
  17. endif
  18. endif
  19. BUILD_CXX_FLAGS += $(MAGIC_FLAGS)
  20. ifneq ($(HAIKU),true)
  21. ifneq ($(WASM),true)
  22. BUILD_CXX_FLAGS += -pthread
  23. endif
  24. endif
  25. # ---------------------------------------------------------------------------------------------------------------------
  26. OBJS = \
  27. $(OBJDIR)/CarlaPlugin.cpp.o \
  28. $(OBJDIR)/CarlaPluginInternal.cpp.o \
  29. $(OBJDIR)/CarlaPluginNative.cpp.o \
  30. $(OBJDIR)/CarlaPluginCLAP.cpp.o \
  31. $(OBJDIR)/CarlaPluginLADSPADSSI.cpp.o \
  32. $(OBJDIR)/CarlaPluginLV2.cpp.o \
  33. $(OBJDIR)/CarlaPluginVST2.cpp.o \
  34. $(OBJDIR)/CarlaPluginVST3.cpp.o \
  35. $(OBJDIR)/CarlaPluginAU.cpp.o \
  36. $(OBJDIR)/CarlaPluginJSFX.cpp.o \
  37. $(OBJDIR)/CarlaPluginJuce.cpp.o \
  38. $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \
  39. $(OBJDIR)/CarlaPluginSFZero.cpp.o
  40. ifeq ($(HAVE_JACK),true)
  41. OBJS += $(OBJDIR)/CarlaPluginJack.cpp.o
  42. endif
  43. ifneq ($(WASM),true)
  44. OBJS += $(OBJDIR)/CarlaPluginBridge.cpp.o
  45. endif
  46. TARGETS = \
  47. $(MODULEDIR)/carla_plugin.a
  48. # ---------------------------------------------------------------------------------------------------------------------
  49. all: $(TARGETS)
  50. # ---------------------------------------------------------------------------------------------------------------------
  51. clean:
  52. rm -f $(OBJS) $(TARGETS)
  53. debug:
  54. $(MAKE) DEBUG=true
  55. # ---------------------------------------------------------------------------------------------------------------------
  56. $(MODULEDIR)/carla_plugin.a: $(OBJS)
  57. -@mkdir -p $(MODULEDIR)
  58. @echo "Creating carla_plugin.a"
  59. $(SILENT)rm -f $@
  60. $(SILENT)$(AR) crs $@ $^
  61. # ---------------------------------------------------------------------------------------------------------------------
  62. $(OBJDIR)/CarlaPluginFluidSynth.cpp.o: CarlaPluginFluidSynth.cpp
  63. -@mkdir -p $(OBJDIR)
  64. @echo "Compiling $<"
  65. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(FLUIDSYNTH_FLAGS) -c -o $@
  66. $(OBJDIR)/CarlaPluginJSFX.cpp.o: CarlaPluginJSFX.cpp
  67. -@mkdir -p $(OBJDIR)
  68. @echo "Compiling $<"
  69. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(YSFX_FLAGS) -c -o $@
  70. ifeq ($(MACOS),true)
  71. $(OBJDIR)/CarlaPluginVST2.cpp.o: CarlaPluginVST2.cpp
  72. -@mkdir -p $(OBJDIR)
  73. @echo "Compiling $<"
  74. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  75. $(OBJDIR)/CarlaPluginVST3.cpp.o: CarlaPluginVST3.cpp
  76. -@mkdir -p $(OBJDIR)
  77. @echo "Compiling $<"
  78. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  79. endif
  80. ifeq ($(USING_JUCE),true)
  81. ifeq ($(MACOS),true)
  82. $(OBJDIR)/CarlaPluginJuce.cpp.o: CarlaPluginJuce.cpp
  83. -@mkdir -p $(OBJDIR)
  84. @echo "Compiling $<"
  85. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -std=gnu++14 -c -o $@
  86. else
  87. $(OBJDIR)/CarlaPluginJuce.cpp.o: CarlaPluginJuce.cpp
  88. -@mkdir -p $(OBJDIR)
  89. @echo "Compiling $<"
  90. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++14 -c -o $@
  91. endif
  92. endif
  93. $(OBJDIR)/%.cpp.o: %.cpp
  94. -@mkdir -p $(OBJDIR)
  95. @echo "Compiling $<"
  96. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  97. -include $(OBJS:%.o=%.d)
  98. # ---------------------------------------------------------------------------------------------------------------------