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.

160 lines
4.9KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-backend #
  3. # -------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. include Makefile.mk
  8. # ---------------------------------------------------------------------------------------------------------------------
  9. OBJS_standalone = \
  10. $(OBJDIR)/CarlaStandalone.cpp.o \
  11. $(OBJDIR)/CarlaStandaloneNSM.cpp.o
  12. ifneq ($(STATIC_PLUGIN_TARGET),true)
  13. TARGETS = \
  14. $(BINDIR)/libcarla_standalone2$(LIB_EXT)
  15. endif
  16. # ---------------------------------------------------------------------------------------------------------------------
  17. BUILD_CXX_FLAGS += $(FLUIDSYNTH_FLAGS)
  18. ifneq ($(HAIKU),true)
  19. ifneq ($(WASM),true)
  20. BUILD_CXX_FLAGS += -pthread
  21. endif
  22. endif
  23. # ---------------------------------------------------------------------------------------------------------------------
  24. STANDALONE_LIBS = $(MODULEDIR)/carla_engine.a
  25. STANDALONE_LIBS += $(MODULEDIR)/carla_plugin.a
  26. STANDALONE_LIBS += $(MODULEDIR)/jackbridge.a
  27. STANDALONE_LIBS += $(MODULEDIR)/audio_decoder.a
  28. STANDALONE_LIBS += $(MODULEDIR)/lilv.a
  29. STANDALONE_LIBS += $(MODULEDIR)/native-plugins.a
  30. STANDALONE_LIBS += $(MODULEDIR)/rtmempool.a
  31. STANDALONE_LIBS += $(MODULEDIR)/sfzero.a
  32. STANDALONE_LIBS += $(MODULEDIR)/water.a
  33. STANDALONE_LIBS += $(MODULEDIR)/zita-resampler.a
  34. ifeq ($(HAVE_DGL),true)
  35. STANDALONE_LIBS += $(MODULEDIR)/dgl.a
  36. endif
  37. ifeq ($(HAVE_HYLIA),true)
  38. STANDALONE_LIBS += $(MODULEDIR)/hylia.a
  39. endif
  40. ifeq ($(USING_JUCE),true)
  41. STANDALONE_LIBS += $(MODULEDIR)/carla_juce.a
  42. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_basics.a
  43. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  44. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_devices.a
  45. endif
  46. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_processors.a
  47. STANDALONE_LIBS += $(MODULEDIR)/juce_core.a
  48. STANDALONE_LIBS += $(MODULEDIR)/juce_data_structures.a
  49. STANDALONE_LIBS += $(MODULEDIR)/juce_events.a
  50. STANDALONE_LIBS += $(MODULEDIR)/juce_graphics.a
  51. STANDALONE_LIBS += $(MODULEDIR)/juce_gui_basics.a
  52. STANDALONE_LIBS += $(MODULEDIR)/juce_gui_extra.a
  53. endif
  54. ifeq ($(USING_RTAUDIO),true)
  55. STANDALONE_LIBS += $(MODULEDIR)/rtaudio.a
  56. STANDALONE_LIBS += $(MODULEDIR)/rtmidi.a
  57. endif
  58. STANDALONE_LIBS += $(MODULEDIR)/ysfx.a
  59. # ---------------------------------------------------------------------------------------------------------------------
  60. STANDALONE_LINK_FLAGS = $(HYLIA_LIBS)
  61. STANDALONE_LINK_FLAGS += $(JACKBRIDGE_LIBS)
  62. STANDALONE_LINK_FLAGS += $(LILV_LIBS)
  63. STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  64. STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  65. STANDALONE_LINK_FLAGS += $(WATER_LIBS)
  66. STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
  67. STANDALONE_LINK_FLAGS += $(MAGIC_LIBS)
  68. STANDALONE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  69. STANDALONE_LINK_FLAGS += $(SDL_LIBS)
  70. STANDALONE_LINK_FLAGS += $(X11_LIBS)
  71. ifeq ($(USING_JUCE),true)
  72. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  73. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  74. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
  75. endif
  76. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  77. STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS)
  78. STANDALONE_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  79. STANDALONE_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  80. STANDALONE_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  81. STANDALONE_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  82. STANDALONE_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  83. endif
  84. ifeq ($(USING_RTAUDIO),true)
  85. STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
  86. STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
  87. endif
  88. STANDALONE_LINK_FLAGS += $(YSFX_GRAPHICS_LIBS)
  89. ifeq ($(JACKBRIDGE_DIRECT),true)
  90. STANDALONE_LINK_FLAGS += $(JACK_LIBS)
  91. endif
  92. # ---------------------------------------------------------------------------------------------------------------------
  93. all: $(TARGETS)
  94. $(MAKE) -C utils
  95. static: $(OBJS_standalone)
  96. # ---------------------------------------------------------------------------------------------------------------------
  97. clean:
  98. rm -f $(OBJS_standalone) $(TARGETS)
  99. $(MAKE) clean -C engine
  100. $(MAKE) clean -C plugin
  101. $(MAKE) clean -C utils
  102. debug:
  103. $(MAKE) DEBUG=true
  104. doxygen: CarlaBackend.doxygen
  105. doxygen $^
  106. # ---------------------------------------------------------------------------------------------------------------------
  107. $(BINDIR)/libcarla_standalone2$(LIB_EXT): $(OBJS_standalone) $(STANDALONE_LIBS)
  108. -@mkdir -p $(BINDIR)
  109. @echo "Linking libcarla_standalone2$(LIB_EXT)"
  110. $(SILENT)$(CXX) $(OBJS_standalone) $(BUILD_CXX_FLAGS) $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_LINK_FLAGS) $(SHARED) -o $@
  111. # ---------------------------------------------------------------------------------------------------------------------
  112. ifeq ($(MACOS),true)
  113. $(OBJDIR)/CarlaStandalone.cpp.o: CarlaStandalone.cpp
  114. -@mkdir -p $(OBJDIR)
  115. @echo "Compiling $<"
  116. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  117. endif
  118. $(OBJDIR)/%.cpp.o: %.cpp
  119. -@mkdir -p $(OBJDIR)
  120. @echo "Compiling $<"
  121. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  122. -include $(OBJS_standalone:%.o=%.d)
  123. # ---------------------------------------------------------------------------------------------------------------------