2 # Makefile for libjack #
3 # -------------------- #
8 include $(CWD
)/Makefile.mk
10 # ---------------------------------------------------------------------------------------------------------------------
12 BINDIR
:= $(CWD
)/..
/bin
15 OBJDIR
:= $(CWD
)/..
/build
/libjack
/Debug
16 MODULEDIR
:= $(CWD
)/..
/build
/modules
/Debug
18 OBJDIR
:= $(CWD
)/..
/build
/libjack
/Release
19 MODULEDIR
:= $(CWD
)/..
/build
/modules
/Release
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
31 # ---------------------------------------------------------------------------------------------------------------------
33 ifeq ($(LINUX
)$(MACOS
),true
)
34 ifneq ($(JACKBRIDGE_DIRECT
),true
)
35 CAN_BUILD_LIBJACK
=true
39 ifeq ($(CAN_BUILD_LIBJACK
),true
)
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
58 TARGET
= $(BINDIR
)/jack
/libjack.dylib
60 TARGET
= $(BINDIR
)/jack
/libjack.so
.0
67 # ---------------------------------------------------------------------------------------------------------------------
71 # ---------------------------------------------------------------------------------------------------------------------
74 rm -f
$(OBJDIR
)/*.o
$(TARGET
)
79 # ---------------------------------------------------------------------------------------------------------------------
82 -@mkdir
-p
$(BINDIR
)/jack
83 @echo
"Linking libjack"
84 $(SILENT
)$(CXX
) $^
$(SHARED
) $(LINK_FLAGS
) $(LIBJACK_LIBS
) -o
$@
86 # ---------------------------------------------------------------------------------------------------------------------
91 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -c
-o
$@
93 $(OBJDIR
)/%.
cpp.o
: %.
cpp
96 $(SILENT
)$(CXX
) $< $(BUILD_CXX_FLAGS
) -c
-o
$@
98 # ---------------------------------------------------------------------------------------------------------------------
100 -include $(OBJS
:%.o
=%.d
)
102 # ---------------------------------------------------------------------------------------------------------------------