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.

96 lines
2.8KB

  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 -lrt
  21. # ---------------------------------------------------------------------------------------------------------------------
  22. ifeq ($(LINUX),true)
  23. ifneq ($(JACKBRIDGE_DIRECT),true)
  24. CAN_BUILD_LIBJACK=true
  25. endif
  26. endif
  27. ifeq ($(CAN_BUILD_LIBJACK),true)
  28. OBJS = \
  29. $(OBJDIR)/libjack.cpp.o \
  30. $(OBJDIR)/libjack_base.cpp.o \
  31. $(OBJDIR)/libjack_callbacks.cpp.o \
  32. $(OBJDIR)/libjack_client.cpp.o \
  33. $(OBJDIR)/libjack_error.cpp.o \
  34. $(OBJDIR)/libjack_latency.cpp.o \
  35. $(OBJDIR)/libjack_non-callback.cpp.o \
  36. $(OBJDIR)/libjack_metadata.cpp.o \
  37. $(OBJDIR)/libjack_midi.cpp.o \
  38. $(OBJDIR)/libjack_ports.cpp.o \
  39. $(OBJDIR)/libjack_port-searching.cpp.o \
  40. $(OBJDIR)/libjack_server-control.cpp.o \
  41. $(OBJDIR)/libjack_stats.cpp.o \
  42. $(OBJDIR)/libjack_time.cpp.o \
  43. $(OBJDIR)/libjack_transport.cpp.o \
  44. $(OBJDIR)/ringbuffer.c.o
  45. TARGET = $(BINDIR)/jack/libjack.so.0
  46. else
  47. OBJS =
  48. TARGET =
  49. endif
  50. # ---------------------------------------------------------------------------------------------------------------------
  51. all: $(TARGET)
  52. # ---------------------------------------------------------------------------------------------------------------------
  53. clean:
  54. rm -f $(OBJDIR)/*.o $(TARGET)
  55. debug:
  56. $(MAKE) DEBUG=true
  57. # ---------------------------------------------------------------------------------------------------------------------
  58. $(TARGET): $(OBJS)
  59. -@mkdir -p $(BINDIR)/jack
  60. @echo "Linking libjack.so.0"
  61. $(SILENT)$(CXX) $^ $(SHARED) $(LINK_FLAGS) $(LIBJACK_LIBS) -o $@
  62. # ---------------------------------------------------------------------------------------------------------------------
  63. $(OBJDIR)/%.c.o: %.c
  64. -@mkdir -p $(OBJDIR)
  65. @echo "Compiling $<"
  66. $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  67. $(OBJDIR)/%.cpp.o: %.cpp
  68. -@mkdir -p $(OBJDIR)
  69. @echo "Compiling $<"
  70. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  71. # ---------------------------------------------------------------------------------------------------------------------
  72. -include $(OBJS:%.o=%.d)
  73. # ---------------------------------------------------------------------------------------------------------------------