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.7KB

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