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.

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