Add initial bits for Qt6 support
[carla.git] / source / libjack / Makefile
blobf6945b1debded8a076418dd3ebfebbd8cbf29c37
1 #!/usr/bin/make -f
2 # Makefile for libjack #
3 # -------------------- #
4 # Created by falkTX
7 CWD=..
8 include $(CWD)/Makefile.mk
10 # ---------------------------------------------------------------------------------------------------------------------
12 BINDIR := $(CWD)/../bin
14 ifeq ($(DEBUG),true)
15 OBJDIR := $(CWD)/../build/libjack/Debug
16 MODULEDIR := $(CWD)/../build/modules/Debug
17 else
18 OBJDIR := $(CWD)/../build/libjack/Release
19 MODULEDIR := $(CWD)/../build/modules/Release
20 endif
22 # ---------------------------------------------------------------------------------------------------------------------
24 BUILD_C_FLAGS += -I$(CWD) -I$(CWD)/includes
25 BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils
26 LINK_FLAGS += -pthread
27 ifeq ($(LINUX),true)
28 LINK_FLAGS += -lrt
29 endif
31 # ---------------------------------------------------------------------------------------------------------------------
33 ifeq ($(LINUX)$(MACOS),true)
34 ifneq ($(JACKBRIDGE_DIRECT),true)
35 CAN_BUILD_LIBJACK=true
36 endif
37 endif
39 ifeq ($(CAN_BUILD_LIBJACK),true)
40 OBJS = \
41 $(OBJDIR)/libjack.cpp.o \
42 $(OBJDIR)/libjack_base.cpp.o \
43 $(OBJDIR)/libjack_callbacks.cpp.o \
44 $(OBJDIR)/libjack_client.cpp.o \
45 $(OBJDIR)/libjack_error.cpp.o \
46 $(OBJDIR)/libjack_latency.cpp.o \
47 $(OBJDIR)/libjack_non-callback.cpp.o \
48 $(OBJDIR)/libjack_metadata.cpp.o \
49 $(OBJDIR)/libjack_midi.cpp.o \
50 $(OBJDIR)/libjack_ports.cpp.o \
51 $(OBJDIR)/libjack_port-searching.cpp.o \
52 $(OBJDIR)/libjack_server-control.cpp.o \
53 $(OBJDIR)/libjack_stats.cpp.o \
54 $(OBJDIR)/libjack_time.cpp.o \
55 $(OBJDIR)/libjack_transport.cpp.o \
56 $(OBJDIR)/ringbuffer.c.o
57 ifeq ($(MACOS),true)
58 TARGET = $(BINDIR)/jack/libjack.dylib
59 else
60 TARGET = $(BINDIR)/jack/libjack.so.0
61 endif
62 else
63 OBJS =
64 TARGET =
65 endif
67 # ---------------------------------------------------------------------------------------------------------------------
69 all: $(TARGET)
71 # ---------------------------------------------------------------------------------------------------------------------
73 clean:
74 rm -f $(OBJDIR)/*.o $(TARGET)
76 debug:
77 $(MAKE) DEBUG=true
79 # ---------------------------------------------------------------------------------------------------------------------
81 $(TARGET): $(OBJS)
82 -@mkdir -p $(BINDIR)/jack
83 @echo "Linking libjack"
84 $(SILENT)$(CXX) $^ $(SHARED) $(LINK_FLAGS) $(LIBJACK_LIBS) -o $@
86 # ---------------------------------------------------------------------------------------------------------------------
88 $(OBJDIR)/%.c.o: %.c
89 -@mkdir -p $(OBJDIR)
90 @echo "Compiling $<"
91 $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
93 $(OBJDIR)/%.cpp.o: %.cpp
94 -@mkdir -p $(OBJDIR)
95 @echo "Compiling $<"
96 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
98 # ---------------------------------------------------------------------------------------------------------------------
100 -include $(OBJS:%.o=%.d)
102 # ---------------------------------------------------------------------------------------------------------------------