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.

97 lines
3.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-interposer #
  3. # ----------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. include $(CWD)/Makefile.mk
  8. # ---------------------------------------------------------------------------------------------------------------------
  9. BINDIR := $(CWD)/../bin
  10. ifeq ($(DEBUG),true)
  11. OBJDIR := $(CWD)/../build/interposer/Debug
  12. MODULEDIR := $(CWD)/../build/modules/Debug
  13. else
  14. OBJDIR := $(CWD)/../build/interposer/Release
  15. MODULEDIR := $(CWD)/../build/modules/Release
  16. endif
  17. # ---------------------------------------------------------------------------------------------------------------------
  18. BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils
  19. INTERPOSER_SAFE_LIBS = $(LIBDL_LIBS)
  20. INTERPOSER_X11_LIBS = $(X11_LIBS) $(LIBDL_LIBS)
  21. # ---------------------------------------------------------------------------------------------------------------------
  22. OBJS =
  23. TARGETS =
  24. ifeq ($(LINUX),true)
  25. OBJS += $(OBJDIR)/interposer-safe.cpp.o
  26. OBJS += $(OBJDIR)/interposer-jack-x11.cpp.o
  27. TARGETS += $(BINDIR)/libcarla_interposer-safe.so
  28. TARGETS += $(BINDIR)/libcarla_interposer-jack-x11.so
  29. ifeq ($(HAVE_X11),true)
  30. OBJS += $(OBJDIR)/interposer-x11.cpp.o
  31. TARGETS += $(BINDIR)/libcarla_interposer-x11.so
  32. endif
  33. endif
  34. # ---------------------------------------------------------------------------------------------------------------------
  35. all: $(TARGETS)
  36. # ---------------------------------------------------------------------------------------------------------------------
  37. clean:
  38. rm -f $(OBJDIR)/*.o $(TARGETS)
  39. debug:
  40. $(MAKE) DEBUG=true
  41. # ---------------------------------------------------------------------------------------------------------------------
  42. $(BINDIR)/libcarla_interposer-safe.so: $(OBJDIR)/interposer-safe.cpp.o
  43. -@mkdir -p $(BINDIR)
  44. @echo "Linking libcarla_interposer-safe.so"
  45. $(SILENT)$(CXX) $< $(SHARED) $(LINK_FLAGS) $(INTERPOSER_SAFE_LIBS) -o $@
  46. $(BINDIR)/libcarla_interposer-x11.so: $(OBJDIR)/interposer-x11.cpp.o
  47. -@mkdir -p $(BINDIR)
  48. @echo "Linking libcarla_interposer-x11.so"
  49. $(SILENT)$(CXX) $< $(SHARED) $(LINK_FLAGS) $(INTERPOSER_X11_LIBS) -o $@
  50. $(BINDIR)/libcarla_interposer-jack-x11.so: $(OBJDIR)/interposer-jack-x11.cpp.o
  51. -@mkdir -p $(BINDIR)
  52. @echo "Linking libcarla_interposer-jack-x11.so"
  53. $(SILENT)$(CXX) $< $(SHARED) $(LINK_FLAGS) $(INTERPOSER_X11_LIBS) -o $@
  54. # ---------------------------------------------------------------------------------------------------------------------
  55. $(OBJDIR)/interposer-safe.cpp.o: interposer-safe.cpp
  56. -@mkdir -p $(OBJDIR)
  57. @echo "Compiling $<"
  58. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  59. $(OBJDIR)/interposer-x11.cpp.o: interposer-x11.cpp
  60. -@mkdir -p $(OBJDIR)
  61. @echo "Compiling $<"
  62. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(X11_FLAGS) -c -o $@
  63. $(OBJDIR)/interposer-jack-x11.cpp.o: interposer-jack-x11.cpp
  64. -@mkdir -p $(OBJDIR)
  65. @echo "Compiling $<"
  66. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(X11_FLAGS) -c -o $@
  67. # ---------------------------------------------------------------------------------------------------------------------
  68. -include $(OBJS:%.o=%.d)
  69. # ---------------------------------------------------------------------------------------------------------------------