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.

Makefile 2.7KB

10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 = -ldl
  20. INTERPOSER_X11_LIBS = $(X11_LIBS) -ldl
  21. # ----------------------------------------------------------------------------------------------------------------------
  22. OBJS =
  23. TARGETS =
  24. ifeq ($(LINUX),true)
  25. OBJS += $(OBJDIR)/interposer-safe.cpp.o
  26. TARGETS += $(BINDIR)/libcarla_interposer-safe.so
  27. ifeq ($(HAVE_X11),true)
  28. OBJS += $(OBJDIR)/interposer-x11.cpp.o
  29. TARGETS += $(BINDIR)/libcarla_interposer-x11.so
  30. endif
  31. endif
  32. # ----------------------------------------------------------------------------------------------------------------------
  33. all: $(TARGETS)
  34. # ----------------------------------------------------------------------------------------------------------------------
  35. clean:
  36. rm -f $(OBJDIR)/*.o $(TARGETS)
  37. debug:
  38. $(MAKE) DEBUG=true
  39. # ----------------------------------------------------------------------------------------------------------------------
  40. $(BINDIR)/libcarla_interposer-safe.so: $(OBJDIR)/interposer-safe.cpp.o
  41. -@mkdir -p $(BINDIR)
  42. @echo "Linking libcarla_interposer-safe.so"
  43. @$(CXX) $< $(SHARED) $(LINK_FLAGS) $(INTERPOSER_SAFE_LIBS) -o $@
  44. $(BINDIR)/libcarla_interposer-x11.so: $(OBJDIR)/interposer-x11.cpp.o
  45. -@mkdir -p $(BINDIR)
  46. @echo "Linking libcarla_interposer-x11.so"
  47. @$(CXX) $< $(SHARED) $(LINK_FLAGS) $(INTERPOSER_X11_LIBS) -o $@
  48. # ----------------------------------------------------------------------------------------------------------------------
  49. $(OBJDIR)/interposer-safe.cpp.o: interposer-safe.cpp
  50. -@mkdir -p $(OBJDIR)
  51. @echo "Compiling $<"
  52. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  53. $(OBJDIR)/interposer-x11.cpp.o: interposer-x11.cpp
  54. -@mkdir -p $(OBJDIR)
  55. @echo "Compiling $<"
  56. @$(CXX) $< $(BUILD_CXX_FLAGS) $(X11_FLAGS) -c -o $@
  57. # ----------------------------------------------------------------------------------------------------------------------
  58. -include $(OBJS:%.o=%.d)
  59. # ----------------------------------------------------------------------------------------------------------------------