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.

136 lines
4.3KB

  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 = \
  10. $(OBJDIR)/CarlaStandalone.cpp.o \
  11. $(OBJDIR)/CarlaUtils.cpp.o
  12. TARGETS = \
  13. $(BINDIR)/libcarla_standalone2$(LIB_EXT) \
  14. $(BINDIR)/libcarla_utils$(LIB_EXT)
  15. # ----------------------------------------------------------------------------------------------------------------------------
  16. STANDALONE_LIBS = $(MODULEDIR)/carla_engine.a
  17. STANDALONE_LIBS += $(MODULEDIR)/carla_plugin.a
  18. STANDALONE_LIBS += $(MODULEDIR)/jackbridge.a
  19. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_basics.a
  20. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_formats.a
  21. STANDALONE_LIBS += $(MODULEDIR)/juce_core.a
  22. STANDALONE_LIBS += $(MODULEDIR)/lilv.a
  23. STANDALONE_LIBS += $(MODULEDIR)/native-plugins.a
  24. STANDALONE_LIBS += $(MODULEDIR)/rtmempool.a
  25. ifeq ($(MACOS_OR_WIN32),true)
  26. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_devices.a
  27. STANDALONE_LIBS += $(MODULEDIR)/juce_audio_processors.a
  28. STANDALONE_LIBS += $(MODULEDIR)/juce_data_structures.a
  29. STANDALONE_LIBS += $(MODULEDIR)/juce_events.a
  30. STANDALONE_LIBS += $(MODULEDIR)/juce_graphics.a
  31. STANDALONE_LIBS += $(MODULEDIR)/juce_gui_basics.a
  32. ifeq ($(MACOS),true)
  33. STANDALONE_LIBS += $(MODULEDIR)/juce_gui_extra.a
  34. endif
  35. else
  36. STANDALONE_LIBS += $(MODULEDIR)/rtaudio.a
  37. STANDALONE_LIBS += $(MODULEDIR)/rtmidi.a
  38. endif
  39. UTILS_LIBS = $(MODULEDIR)/juce_core.a
  40. # ----------------------------------------------------------------------------------------------------------------------------
  41. STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
  42. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  43. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
  44. STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS)
  45. STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
  46. STANDALONE_LINK_FLAGS += $(LILV_LIBS)
  47. STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  48. STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  49. ifeq ($(MACOS_OR_WIN32),true)
  50. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
  51. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  52. STANDALONE_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  53. STANDALONE_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  54. STANDALONE_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  55. STANDALONE_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  56. ifeq ($(MACOS),true)
  57. STANDALONE_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  58. endif
  59. else
  60. STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
  61. STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
  62. endif
  63. ifeq ($(HAVE_FLUIDSYNTH),true)
  64. STANDALONE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  65. endif
  66. ifeq ($(HAVE_LINUXSAMPLER),true)
  67. STANDALONE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  68. endif
  69. ifeq ($(HAVE_X11),true)
  70. STANDALONE_LINK_FLAGS += $(X11_LIBS)
  71. endif
  72. ifeq ($(UNIX),true)
  73. STANDALONE_LINK_FLAGS += -lmagic
  74. endif
  75. UTILS_LINK_FLAGS = $(JUCE_CORE_LIBS)
  76. ifeq ($(UNIX),true)
  77. UTILS_LINK_FLAGS += -lpthread
  78. endif
  79. # ----------------------------------------------------------------------------------------------------------------------------
  80. all: $(TARGETS)
  81. # ----------------------------------------------------------------------------------------------------------------------------
  82. clean:
  83. rm -f $(OBJS) $(TARGETS)
  84. $(MAKE) clean -C engine
  85. $(MAKE) clean -C plugin
  86. debug:
  87. $(MAKE) DEBUG=true
  88. doxygen: CarlaBackend.doxygen
  89. doxygen $^
  90. # ----------------------------------------------------------------------------------------------------------------------------
  91. $(BINDIR)/libcarla_standalone2$(LIB_EXT): $(OBJDIR)/CarlaStandalone.cpp.o $(STANDALONE_LIBS)
  92. -@mkdir -p $(BINDIR)
  93. @echo "Linking libcarla_standalone2$(LIB_EXT)"
  94. @$(CXX) $< $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_LINK_FLAGS) $(SHARED) -o $@
  95. $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJDIR)/CarlaUtils.cpp.o $(UTILS_LIBS)
  96. -@mkdir -p $(BINDIR)
  97. @echo "Linking libcarla_utils$(LIB_EXT)"
  98. @$(CXX) $< $(LIBS_START) $(UTILS_LIBS) $(LIBS_END) $(LINK_FLAGS) $(UTILS_LINK_FLAGS) $(SHARED) -o $@
  99. # ----------------------------------------------------------------------------------------------------------------------------
  100. $(OBJDIR)/%.cpp.o: %.cpp
  101. -@mkdir -p $(OBJDIR)
  102. @echo "Compiling $<"
  103. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  104. -include $(OBJS:%.o=%.d)
  105. # ----------------------------------------------------------------------------------------------------------------------------