From 8e5c2e292e229d6e4dbc28c64e5e3a55f777ed60 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Sep 2017 23:57:09 +0200 Subject: [PATCH] Move libjack into its own dir --- Makefile | 14 ++--- source/interposer/Makefile | 32 +++------- source/libjack/Makefile | 68 ++++++++++++++++++++++ source/{interposer => libjack}/libjack.cpp | 0 4 files changed, 84 insertions(+), 30 deletions(-) create mode 100644 source/libjack/Makefile rename source/{interposer => libjack}/libjack.cpp (100%) diff --git a/Makefile b/Makefile index c9363ba3d..e100895bf 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ all: BIN RES UI WIDGETS # ---------------------------------------------------------------------------------------------------------------------------- # Binaries (native) -BIN: backend discovery bridges-plugin bridges-ui interposer plugin theme +BIN: backend discovery bridges-plugin bridges-ui interposer libjack plugin theme # ---------------------------------------------------------------------------------------------------------------------------- @@ -112,13 +112,10 @@ $(MODULEDIR)/jackbridge.%.a: .FORCE $(MODULEDIR)/native-plugins.a: .FORCE @$(MAKE) -C source/native-plugins -$(MODULEDIR)/theme.a: theme .FORCE - @$(MAKE) -C source/theme - -$(MODULEDIR)/theme.qt4.a: theme .FORCE +$(MODULEDIR)/theme.qt4.a: .FORCE @$(MAKE) -C source/theme qt4 -$(MODULEDIR)/theme.qt5.a: theme .FORCE +$(MODULEDIR)/theme.qt5.a: .FORCE @$(MAKE) -C source/theme qt5 $(MODULEDIR)/%.posix32.a: .FORCE @@ -150,9 +147,12 @@ bridges-ui: libs discovery: libs @$(MAKE) -C source/discovery -interposer: libs +interposer: @$(MAKE) -C source/interposer +libjack: libs + @$(MAKE) -C source/libjack + plugin: backend bridges-plugin bridges-ui discovery @$(MAKE) -C source/plugin diff --git a/source/interposer/Makefile b/source/interposer/Makefile index 624a0b144..f6f28618a 100644 --- a/source/interposer/Makefile +++ b/source/interposer/Makefile @@ -7,7 +7,7 @@ CWD=.. include $(CWD)/Makefile.mk -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- BINDIR := $(CWD)/../bin @@ -19,16 +19,14 @@ OBJDIR := $(CWD)/../build/interposer/Release MODULEDIR := $(CWD)/../build/modules/Release endif -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils INTERPOSER_SAFE_LIBS = -ldl INTERPOSER_X11_LIBS = $(X11_LIBS) -ldl -LIBJACK_LIBS = $(MODULEDIR)/juce_core.a -LIBJACK_LIBS += $(JUCE_CORE_LIBS) -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- OBJS = TARGETS = @@ -37,20 +35,17 @@ ifeq ($(LINUX),true) OBJS += $(OBJDIR)/interposer-safe.cpp.o TARGETS += $(BINDIR)/libcarla_interposer-safe.so -OBJS += $(OBJDIR)/libjack.cpp.o -TARGETS += $(BINDIR)/jack/libjack.so.0 - ifeq ($(HAVE_X11),true) OBJS += $(OBJDIR)/interposer-x11.cpp.o TARGETS += $(BINDIR)/libcarla_interposer-x11.so endif endif -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- all: $(TARGETS) -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- clean: rm -f $(OBJDIR)/*.o $(TARGETS) @@ -58,7 +53,7 @@ clean: debug: $(MAKE) DEBUG=true -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- $(BINDIR)/libcarla_interposer-safe.so: $(OBJDIR)/interposer-safe.cpp.o -@mkdir -p $(BINDIR) @@ -70,12 +65,7 @@ $(BINDIR)/libcarla_interposer-x11.so: $(OBJDIR)/interposer-x11.cpp.o @echo "Linking libcarla_interposer-x11.so" @$(CXX) $< $(SHARED) $(LINK_FLAGS) $(INTERPOSER_X11_LIBS) -o $@ -$(BINDIR)/jack/libjack.so.0: $(OBJDIR)/libjack.cpp.o - -@mkdir -p $(BINDIR)/jack - @echo "Linking libjack.so.0" - @$(CXX) $< $(SHARED) $(LINK_FLAGS) $(LIBJACK_LIBS) -o $@ - -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- $(OBJDIR)/interposer-safe.cpp.o: interposer-safe.cpp -@mkdir -p $(OBJDIR) @@ -87,12 +77,8 @@ $(OBJDIR)/interposer-x11.cpp.o: interposer-x11.cpp @echo "Compiling $<" @$(CXX) $< $(BUILD_CXX_FLAGS) $(X11_FLAGS) -c -o $@ -$(OBJDIR)/libjack.cpp.o: libjack.cpp - -@mkdir -p $(OBJDIR) - @echo "Compiling $<" - @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ - # -Wno-missing-declarations +# ---------------------------------------------------------------------------------------------------------------------- -include $(OBJS:%.o=%.d) -# ---------------------------------------------------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------- diff --git a/source/libjack/Makefile b/source/libjack/Makefile new file mode 100644 index 000000000..6804ff9c5 --- /dev/null +++ b/source/libjack/Makefile @@ -0,0 +1,68 @@ +#!/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_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils +LINK_FLAGS += $(MODULEDIR)/juce_core.a +LINK_FLAGS += $(JUCE_CORE_LIBS) + +# ---------------------------------------------------------------------------------------------------------------------- + +OBJS = +TARGETS = + +ifeq ($(LINUX),true) +OBJS = $(OBJDIR)/libjack.cpp.o +TARGETS = $(BINDIR)/jack/libjack.so.0 +endif + +# ---------------------------------------------------------------------------------------------------------------------- + +all: $(TARGETS) + +# ---------------------------------------------------------------------------------------------------------------------- + +clean: + rm -f $(OBJDIR)/*.o $(TARGETS) + +debug: + $(MAKE) DEBUG=true + +# ---------------------------------------------------------------------------------------------------------------------- + +$(BINDIR)/jack/libjack.so.0: $(OBJDIR)/libjack.cpp.o + -@mkdir -p $(BINDIR)/jack + @echo "Linking libjack.so.0" + @$(CXX) $< $(SHARED) $(LINK_FLAGS) $(LIBJACK_LIBS) -o $@ + +# ---------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/libjack.cpp.o: libjack.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------- + +-include $(OBJS:%.o=%.d) + +# ---------------------------------------------------------------------------------------------------------------------- diff --git a/source/interposer/libjack.cpp b/source/libjack/libjack.cpp similarity index 100% rename from source/interposer/libjack.cpp rename to source/libjack/libjack.cpp