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.

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