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.

172 lines
5.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_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. ifeq ($(MACOS),true)
  49. UTILS_LIBS += $(MODULEDIR)/juce_audio_processors.a
  50. UTILS_LIBS += $(MODULEDIR)/juce_data_structures.a
  51. UTILS_LIBS += $(MODULEDIR)/juce_events.a
  52. UTILS_LIBS += $(MODULEDIR)/juce_graphics.a
  53. UTILS_LIBS += $(MODULEDIR)/juce_gui_basics.a
  54. UTILS_LIBS += $(MODULEDIR)/juce_gui_extra.a
  55. endif
  56. # ----------------------------------------------------------------------------------------------------------------------------
  57. STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
  58. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  59. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
  60. STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS)
  61. STANDALONE_LINK_FLAGS += $(LILV_LIBS)
  62. STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  63. STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  64. ifeq ($(MACOS_OR_WIN32),true)
  65. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
  66. STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  67. STANDALONE_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  68. STANDALONE_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  69. STANDALONE_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  70. STANDALONE_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  71. ifeq ($(MACOS),true)
  72. STANDALONE_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  73. endif
  74. else
  75. STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
  76. STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
  77. endif
  78. ifeq ($(HAVE_LIBLO),true)
  79. STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
  80. endif
  81. ifeq ($(HAVE_LIBMAGIC),true)
  82. STANDALONE_LINK_FLAGS += -lmagic
  83. endif
  84. ifeq ($(HAVE_FLUIDSYNTH),true)
  85. STANDALONE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  86. endif
  87. ifeq ($(HAVE_LINUXSAMPLER),true)
  88. STANDALONE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  89. endif
  90. ifeq ($(HAVE_X11),true)
  91. STANDALONE_LINK_FLAGS += $(X11_LIBS)
  92. endif
  93. UTILS_LINK_FLAGS = $(JUCE_AUDIO_BASICS_LIBS)
  94. UTILS_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
  95. UTILS_LINK_FLAGS += $(JUCE_CORE_LIBS)
  96. UTILS_LINK_FLAGS += $(LILV_LIBS)
  97. ifeq ($(MACOS),true)
  98. UTILS_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  99. UTILS_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  100. UTILS_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  101. UTILS_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  102. UTILS_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  103. UTILS_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  104. endif
  105. ifneq ($(HAIKU),true)
  106. UTILS_LINK_FLAGS += -lpthread
  107. endif
  108. # ----------------------------------------------------------------------------------------------------------------------------
  109. all: $(TARGETS)
  110. # ----------------------------------------------------------------------------------------------------------------------------
  111. clean:
  112. rm -f $(OBJS_standalone) $(OBJS_utils) $(TARGETS)
  113. $(MAKE) clean -C engine
  114. $(MAKE) clean -C plugin
  115. debug:
  116. $(MAKE) DEBUG=true
  117. doxygen: CarlaBackend.doxygen
  118. doxygen $^
  119. # ----------------------------------------------------------------------------------------------------------------------------
  120. $(BINDIR)/libcarla_standalone2$(LIB_EXT): $(OBJS_standalone) $(STANDALONE_LIBS)
  121. -@mkdir -p $(BINDIR)
  122. @echo "Linking libcarla_standalone2$(LIB_EXT)"
  123. @$(CXX) $(OBJS_standalone) $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_LINK_FLAGS) $(SHARED) -o $@
  124. $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJS_utils) $(UTILS_LIBS)
  125. -@mkdir -p $(BINDIR)
  126. @echo "Linking libcarla_utils$(LIB_EXT)"
  127. @$(CXX) $(OBJS_utils) $(LIBS_START) $(UTILS_LIBS) $(LIBS_END) $(LINK_FLAGS) $(UTILS_LINK_FLAGS) $(SHARED) -o $@
  128. # ----------------------------------------------------------------------------------------------------------------------------
  129. $(OBJDIR)/%.cpp.o: %.cpp
  130. -@mkdir -p $(OBJDIR)
  131. @echo "Compiling $<"
  132. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  133. -include $(OBJS_standalone:%.o=%.d)
  134. -include $(OBJS_utils:%.o=%.d)
  135. # ----------------------------------------------------------------------------------------------------------------------------