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.

130 lines
3.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)/audio_decoder.a
  22. STANDALONE_LIBS += $(MODULEDIR)/lilv.a
  23. STANDALONE_LIBS += $(MODULEDIR)/native-plugins.all.a
  24. STANDALONE_LIBS += $(MODULEDIR)/rtmempool.a
  25. STANDALONE_LIBS += $(MODULEDIR)/sfzero.a
  26. STANDALONE_LIBS += $(MODULEDIR)/water.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. STANDALONE_LIBS += $(MODULEDIR)/rtaudio.a
  34. STANDALONE_LIBS += $(MODULEDIR)/rtmidi.a
  35. UTILS_LIBS += $(MODULEDIR)/lilv.a
  36. UTILS_LIBS += $(MODULEDIR)/water.files.a
  37. # ----------------------------------------------------------------------------------------------------------------------------
  38. STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
  39. STANDALONE_LINK_FLAGS += $(LILV_LIBS)
  40. STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  41. STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  42. STANDALONE_LINK_FLAGS += $(WATER_LIBS)
  43. STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
  44. STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
  45. STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
  46. STANDALONE_LINK_FLAGS += $(MAGIC_LIBS)
  47. STANDALONE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  48. STANDALONE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  49. STANDALONE_LINK_FLAGS += $(X11_LIBS)
  50. UTILS_LINK_FLAGS += $(LILV_LIBS)
  51. UTILS_LINK_FLAGS += $(WATER_LIBS)
  52. ifeq ($(HAVE_X11),true)
  53. UTILS_LINK_FLAGS += $(X11_LIBS)
  54. endif
  55. ifneq ($(HAIKU),true)
  56. UTILS_LINK_FLAGS += -lpthread
  57. endif
  58. # ----------------------------------------------------------------------------------------------------------------------------
  59. all: $(TARGETS)
  60. # ----------------------------------------------------------------------------------------------------------------------------
  61. clean:
  62. rm -f $(OBJS_standalone) $(OBJS_utils) $(TARGETS)
  63. $(MAKE) clean -C engine
  64. $(MAKE) clean -C plugin
  65. debug:
  66. $(MAKE) DEBUG=true
  67. doxygen: CarlaBackend.doxygen
  68. doxygen $^
  69. # ----------------------------------------------------------------------------------------------------------------------------
  70. $(BINDIR)/libcarla_standalone2$(LIB_EXT): $(OBJS_standalone) $(STANDALONE_LIBS)
  71. -@mkdir -p $(BINDIR)
  72. @echo "Linking libcarla_standalone2$(LIB_EXT)"
  73. @$(CXX) $(OBJS_standalone) $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_LINK_FLAGS) $(SHARED) -o $@
  74. $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJS_utils) $(UTILS_LIBS)
  75. -@mkdir -p $(BINDIR)
  76. @echo "Linking libcarla_utils$(LIB_EXT)"
  77. @$(CXX) $(OBJS_utils) $(LIBS_START) $(UTILS_LIBS) $(LIBS_END) $(LINK_FLAGS) $(UTILS_LINK_FLAGS) $(SHARED) -o $@
  78. # ----------------------------------------------------------------------------------------------------------------------------
  79. ifeq ($(MACOS),true)
  80. $(OBJDIR)/CarlaStandalone.cpp.o: CarlaStandalone.cpp
  81. -@mkdir -p $(OBJDIR)
  82. @echo "Compiling $<"
  83. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  84. $(OBJDIR)/CarlaUtils.cpp.o: CarlaUtils.cpp
  85. -@mkdir -p $(OBJDIR)
  86. @echo "Compiling $<"
  87. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  88. endif
  89. $(OBJDIR)/%.cpp.o: %.cpp
  90. -@mkdir -p $(OBJDIR)
  91. @echo "Compiling $<"
  92. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  93. -include $(OBJS_standalone:%.o=%.d)
  94. -include $(OBJS_utils:%.o=%.d)
  95. # ----------------------------------------------------------------------------------------------------------------------------