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

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