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.

180 lines
5.5KB

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