Browse Source

Cleanup the way split lv2-bundles are installed

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 5 years ago
parent
commit
8e8fe2e111
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 56 additions and 16 deletions
  1. +4
    -1
      Makefile
  2. +40
    -0
      source/native-plugins/Makefile
  3. +12
    -15
      source/plugin/Makefile

+ 4
- 1
Makefile View File

@@ -179,7 +179,10 @@ endif
libjack: libs
@$(MAKE) -C source/libjack

lv2-bundles: $(MODULEDIR)/native-plugins.a $(MODULEDIR)/audio_decoder.a $(MODULEDIR)/water.a
lv2-bundles-dep: $(MODULEDIR)/audio_decoder.a $(MODULEDIR)/water.a
@$(MAKE) -C source/native-plugins bundles

lv2-bundles: lv2-bundles-dep
@$(MAKE) -C source/plugin bundles

plugin: backend bridges-plugin bridges-ui discovery


+ 40
- 0
source/native-plugins/Makefile View File

@@ -19,6 +19,11 @@ BUILD_CXX_FLAGS += -I.. -I$(CWD)/modules

TARGETS = $(MODULEDIR)/$(MODULENAME).a

BUNDLES = \
$(MODULEDIR)/$(MODULENAME)_audiogain.a \
$(MODULEDIR)/$(MODULENAME)_files.a \
$(MODULEDIR)/$(MODULENAME)_miditools.a

# ---------------------------------------------------------------------------------------------------------------------
# Set objects

@@ -42,6 +47,22 @@ OBJS = \
$(OBJDIR)/midi-pattern.cpp.o \
$(OBJDIR)/notes.cpp.o

OBJS_audiogain = \
$(OBJDIR)/audio-gain.c.o

OBJS_files = \
$(OBJDIR)/audio-file.cpp.o \
$(OBJDIR)/midi-file.cpp.o

OBJS_miditools = \
$(OBJDIR)/midi-channel-filter.c.o \
$(OBJDIR)/midi-channel-ab.c.o \
$(OBJDIR)/midi-channelize.c.o \
$(OBJDIR)/midi-gain.c.o \
$(OBJDIR)/midi-join.c.o \
$(OBJDIR)/midi-split.c.o \
$(OBJDIR)/midi-transpose.c.o

# ---------------------------------------------------------------------------------------------------------------------
# Include external plugins, if present

@@ -56,6 +77,7 @@ endif
# ---------------------------------------------------------------------------------------------------------------------

all: $(TARGETS)
bundles: $(BUNDLES)

# ---------------------------------------------------------------------------------------------------------------------

@@ -73,6 +95,24 @@ $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME)_audiogain.a: $(OBJS_audiogain)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME)_audiogain.a"
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME)_files.a: $(OBJS_files)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME)_files.a"
@rm -f $@
@$(AR) crs $@ $^

$(MODULEDIR)/$(MODULENAME)_miditools.a: $(OBJS_miditools)
-@mkdir -p $(MODULEDIR)
@echo "Creating $(MODULENAME)_miditools.a"
@rm -f $@
@$(AR) crs $@ $^

# ---------------------------------------------------------------------------------------------------------------------

$(OBJDIR)/%.c.o: %.c


+ 12
- 15
source/plugin/Makefile View File

@@ -17,15 +17,14 @@ endif
# ---------------------------------------------------------------------------------------------------------------------

BINDIR := $(CWD)/../bin
DATADIR := $(CWD)/../data

ifeq ($(DEBUG),true)
OBJDIR := $(CWD)/../build/plugin/Debug
MODULEDIR := $(CWD)/../build/modules/Debug
NPOBJDIR := $(CWD)/../build/native-plugins/Debug
else
OBJDIR := $(CWD)/../build/plugin/Release
MODULEDIR := $(CWD)/../build/modules/Release
NPOBJDIR := $(CWD)/../build/native-plugins/Release
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -188,8 +187,11 @@ endif
BUNDLES = audiogain files miditools

bundles: \
$(BINDIR)/carla-audiogain.lv2/manifest.ttl \
$(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT) \
$(BINDIR)/carla-files.lv2/manifest.ttl \
$(BINDIR)/carla-files.lv2/carla$(LIB_EXT) \
$(BINDIR)/carla-miditools.lv2/manifest.ttl \
$(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT)

BUNDLE_LIBS += $(MODULEDIR)/water.files.a
@@ -206,6 +208,7 @@ clean:
rm -f $(OBJDIR)/*.o $(TARGETS)
rm -f $(BINDIR)/carla.lv2/*.*
rm -f $(BINDIR)/carla-lv2-export$(APP_EXT)
rm -rf $(BINDIR)/carla-*.lv2

debug:
$(MAKE) DEBUG=true
@@ -236,27 +239,21 @@ $(BINDIR)/carla.lv2/carla-ui$(LIB_EXT): $(OBJDIR)/carla-lv2-ui.cpp.o $(LIBS_ui)

# ---------------------------------------------------------------------------------------------------------------------

$(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.o \
$(NPOBJDIR)/audio-gain.c.o
$(BINDIR)/carla-%.lv2/manifest.ttl: $(DATADIR)/lv2-bundles/%/*.ttl
-@mkdir -p $(shell dirname $@)
@cp -v $^ $(shell dirname $@)

$(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.o $(MODULEDIR)/native-plugins_audiogain.a
-@mkdir -p $(BINDIR)/carla-audiogain.lv2
@echo "Linking carla-audiogain.lv2/carla$(LIB_EXT)"
@$(CXX) $^ $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_LIBS) $(LINK_FLAGS) -ldl -o $@

$(BINDIR)/carla-files.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.files.o \
$(NPOBJDIR)/audio-file.cpp.o \
$(NPOBJDIR)/midi-file.cpp.o
$(BINDIR)/carla-files.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.files.o $(MODULEDIR)/native-plugins_files.a
-@mkdir -p $(BINDIR)/carla-files.lv2
@echo "Linking carla-files.lv2/carla$(LIB_EXT)"
@$(CXX) $^ $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_FILES_LIBS) $(LINK_FLAGS) -o $@

$(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.miditools.o \
$(NPOBJDIR)/midi-channel-ab.c.o \
$(NPOBJDIR)/midi-channel-filter.c.o \
$(NPOBJDIR)/midi-channelize.c.o \
$(NPOBJDIR)/midi-gain.c.o \
$(NPOBJDIR)/midi-join.c.o \
$(NPOBJDIR)/midi-split.c.o \
$(NPOBJDIR)/midi-transpose.c.o
$(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.miditools.o $(MODULEDIR)/native-plugins_miditools.a
-@mkdir -p $(BINDIR)/carla-miditools.lv2
@echo "Linking carla-miditools.lv2/carla$(LIB_EXT)"
@$(CXX) $^ $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_LIBS) $(LINK_FLAGS) -o $@


Loading…
Cancel
Save