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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #!/usr/bin/make -f
  2. # Makefile for libjack #
  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/libjack/Debug
  12. MODULEDIR := $(CWD)/../build/modules/Debug
  13. else
  14. OBJDIR := $(CWD)/../build/libjack/Release
  15. MODULEDIR := $(CWD)/../build/modules/Release
  16. endif
  17. # ---------------------------------------------------------------------------------------------------------------------
  18. BUILD_C_FLAGS += -I$(CWD) -I$(CWD)/includes
  19. BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils
  20. LINK_FLAGS += -pthread
  21. ifeq ($(LINUX),true)
  22. LINK_FLAGS += -lrt
  23. endif
  24. # ---------------------------------------------------------------------------------------------------------------------
  25. ifeq ($(LINUX)$(MACOS),true)
  26. ifneq ($(JACKBRIDGE_DIRECT),true)
  27. CAN_BUILD_LIBJACK=true
  28. endif
  29. endif
  30. ifeq ($(CAN_BUILD_LIBJACK),true)
  31. OBJS = \
  32. $(OBJDIR)/libjack.cpp.o \
  33. $(OBJDIR)/libjack_base.cpp.o \
  34. $(OBJDIR)/libjack_callbacks.cpp.o \
  35. $(OBJDIR)/libjack_client.cpp.o \
  36. $(OBJDIR)/libjack_error.cpp.o \
  37. $(OBJDIR)/libjack_latency.cpp.o \
  38. $(OBJDIR)/libjack_non-callback.cpp.o \
  39. $(OBJDIR)/libjack_metadata.cpp.o \
  40. $(OBJDIR)/libjack_midi.cpp.o \
  41. $(OBJDIR)/libjack_ports.cpp.o \
  42. $(OBJDIR)/libjack_port-searching.cpp.o \
  43. $(OBJDIR)/libjack_server-control.cpp.o \
  44. $(OBJDIR)/libjack_stats.cpp.o \
  45. $(OBJDIR)/libjack_time.cpp.o \
  46. $(OBJDIR)/libjack_transport.cpp.o \
  47. $(OBJDIR)/ringbuffer.c.o
  48. ifeq ($(MACOS),true)
  49. TARGET = $(BINDIR)/jack/libjack.dylib
  50. else
  51. TARGET = $(BINDIR)/jack/libjack.so.0
  52. endif
  53. else
  54. OBJS =
  55. TARGET =
  56. endif
  57. # ---------------------------------------------------------------------------------------------------------------------
  58. all: $(TARGET)
  59. # ---------------------------------------------------------------------------------------------------------------------
  60. clean:
  61. rm -f $(OBJDIR)/*.o $(TARGET)
  62. debug:
  63. $(MAKE) DEBUG=true
  64. # ---------------------------------------------------------------------------------------------------------------------
  65. $(TARGET): $(OBJS)
  66. -@mkdir -p $(BINDIR)/jack
  67. @echo "Linking libjack"
  68. $(SILENT)$(CXX) $^ $(SHARED) $(LINK_FLAGS) $(LIBJACK_LIBS) -o $@
  69. # ---------------------------------------------------------------------------------------------------------------------
  70. $(OBJDIR)/%.c.o: %.c
  71. -@mkdir -p $(OBJDIR)
  72. @echo "Compiling $<"
  73. $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  74. $(OBJDIR)/%.cpp.o: %.cpp
  75. -@mkdir -p $(OBJDIR)
  76. @echo "Compiling $<"
  77. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  78. # ---------------------------------------------------------------------------------------------------------------------
  79. -include $(OBJS:%.o=%.d)
  80. # ---------------------------------------------------------------------------------------------------------------------