|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #!/usr/bin/make -f
- # Makefile for libjack #
- # -------------------- #
- # Created by falkTX
- #
-
- CWD=..
- include $(CWD)/Makefile.mk
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- BINDIR := $(CWD)/../bin
-
- ifeq ($(DEBUG),true)
- OBJDIR := $(CWD)/../build/libjack/Debug
- MODULEDIR := $(CWD)/../build/modules/Debug
- else
- OBJDIR := $(CWD)/../build/libjack/Release
- MODULEDIR := $(CWD)/../build/modules/Release
- endif
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- BUILD_C_FLAGS += -I$(CWD) -I$(CWD)/includes
- BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils
- LINK_FLAGS += -pthread -lrt
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- ifeq ($(LINUX),true)
- ifneq ($(JACKBRIDGE_DIRECT),true)
- CAN_BUILD_LIBJACK=true
- endif
- endif
-
- ifeq ($(CAN_BUILD_LIBJACK),true)
- OBJS = \
- $(OBJDIR)/libjack.cpp.o \
- $(OBJDIR)/libjack_base.cpp.o \
- $(OBJDIR)/libjack_callbacks.cpp.o \
- $(OBJDIR)/libjack_client.cpp.o \
- $(OBJDIR)/libjack_error.cpp.o \
- $(OBJDIR)/libjack_latency.cpp.o \
- $(OBJDIR)/libjack_non-callback.cpp.o \
- $(OBJDIR)/libjack_metadata.cpp.o \
- $(OBJDIR)/libjack_midi.cpp.o \
- $(OBJDIR)/libjack_ports.cpp.o \
- $(OBJDIR)/libjack_port-searching.cpp.o \
- $(OBJDIR)/libjack_server-control.cpp.o \
- $(OBJDIR)/libjack_stats.cpp.o \
- $(OBJDIR)/libjack_time.cpp.o \
- $(OBJDIR)/libjack_transport.cpp.o \
- $(OBJDIR)/ringbuffer.c.o
- TARGET = $(BINDIR)/jack/libjack.so.0
- else
- OBJS =
- TARGET =
- endif
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- all: $(TARGET)
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- clean:
- rm -f $(OBJDIR)/*.o $(TARGET)
-
- debug:
- $(MAKE) DEBUG=true
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- $(TARGET): $(OBJS)
- -@mkdir -p $(BINDIR)/jack
- @echo "Linking libjack.so.0"
- $(SILENT)$(CXX) $^ $(SHARED) $(LINK_FLAGS) $(LIBJACK_LIBS) -o $@
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- $(OBJDIR)/%.c.o: %.c
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
-
- $(OBJDIR)/%.cpp.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- -include $(OBJS:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
|