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.

145 lines
4.6KB

  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_audio_basics.a
  40. UTILS_LIBS += $(MODULEDIR)/juce_audio_formats.a
  41. UTILS_LIBS += $(MODULEDIR)/juce_core.a
  42. UTILS_LIBS += $(MODULEDIR)/lilv.a
  43. UTILS_LIBS += $(MODULEDIR)/native-plugins.a
  44. # ----------------------------------------------------------------------------------------------------------------------------
  45. STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
  46. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  47. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
  48. STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS)
  49. STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
  50. STANDALONE_LINK_FLAGS += $(LILV_LIBS)
  51. STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  52. STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  53. ifeq ($(MACOS_OR_WIN32),true)
  54. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
  55. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  56. STANDALONE_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  57. STANDALONE_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  58. STANDALONE_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  59. STANDALONE_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  60. ifeq ($(MACOS),true)
  61. STANDALONE_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  62. endif
  63. else
  64. STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
  65. STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
  66. endif
  67. ifeq ($(HAVE_FLUIDSYNTH),true)
  68. STANDALONE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  69. endif
  70. ifeq ($(HAVE_LINUXSAMPLER),true)
  71. STANDALONE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  72. endif
  73. ifeq ($(HAVE_X11),true)
  74. STANDALONE_LINK_FLAGS += $(X11_LIBS)
  75. endif
  76. ifeq ($(UNIX),true)
  77. STANDALONE_LINK_FLAGS += -lmagic
  78. endif
  79. UTILS_LINK_FLAGS = $(JUCE_AUDIO_BASICS_LIBS)
  80. UTILS_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
  81. UTILS_LINK_FLAGS += $(JUCE_CORE_LIBS)
  82. UTILS_LINK_FLAGS += $(LILV_LIBS)
  83. UTILS_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  84. ifneq ($(HAIKU),true)
  85. UTILS_LINK_FLAGS += -lpthread
  86. endif
  87. # ----------------------------------------------------------------------------------------------------------------------------
  88. all: $(TARGETS)
  89. # ----------------------------------------------------------------------------------------------------------------------------
  90. clean:
  91. rm -f $(OBJS) $(TARGETS)
  92. $(MAKE) clean -C engine
  93. $(MAKE) clean -C plugin
  94. debug:
  95. $(MAKE) DEBUG=true
  96. doxygen: CarlaBackend.doxygen
  97. doxygen $^
  98. # ----------------------------------------------------------------------------------------------------------------------------
  99. $(BINDIR)/libcarla_standalone2$(LIB_EXT): $(OBJDIR)/CarlaStandalone.cpp.o $(STANDALONE_LIBS)
  100. -@mkdir -p $(BINDIR)
  101. @echo "Linking libcarla_standalone2$(LIB_EXT)"
  102. @$(CXX) $< $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_LINK_FLAGS) $(SHARED) -o $@
  103. $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJDIR)/CarlaUtils.cpp.o $(UTILS_LIBS)
  104. -@mkdir -p $(BINDIR)
  105. @echo "Linking libcarla_utils$(LIB_EXT)"
  106. @$(CXX) $< $(LIBS_START) $(UTILS_LIBS) $(LIBS_END) $(LINK_FLAGS) $(UTILS_LINK_FLAGS) $(SHARED) -o $@
  107. # ----------------------------------------------------------------------------------------------------------------------------
  108. $(OBJDIR)/%.cpp.o: %.cpp
  109. -@mkdir -p $(OBJDIR)
  110. @echo "Compiling $<"
  111. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  112. -include $(OBJS:%.o=%.d)
  113. # ----------------------------------------------------------------------------------------------------------------------------