Skip to content

Instantly share code, notes, and snippets.

@SpotlightKid
Last active April 11, 2024 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SpotlightKid/828a2c44906f4a1e3ea5ac8b24daed66 to your computer and use it in GitHub Desktop.
Save SpotlightKid/828a2c44906f4a1e3ea5ac8b24daed66 to your computer and use it in GitHub Desktop.
Generic FAUST to LV2 plugin makefile
DESTDIR ?=
PREFIX ?= /usr
LV2_DIR ?= $(PREFIX)/lib/lv2
FAUSTFLAGS ?= -nvoices 4
NAME ?= mydsp
FAUST_DSP = $(NAME).dsp
LV2_BUNDLE = $(NAME).lv2
ROOT_DIR:=$(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))")
all: $(LV2_BUNDLE)
$(LV2_BUNDLE): $(FAUST_DSP)
faust2lv2 $(FAUSTFLAGS) $<
install: uninstall $(LV2_BUNDLE)
@install -v -Dm 755 $(LV2_BUNDLE)/*.so -t $(DESTDIR)$(LV2_DIR)/$(LV2_BUNDLE)
@install -v -Dm 644 $(LV2_BUNDLE)/*.ttl -t $(DESTDIR)$(LV2_DIR)/$(LV2_BUNDLE)
install-link: uninstall
ln -s $(ROOT_DIR)/$(LV2_BUNDLE) $(DESTDIR)$(LV2_DIR)/$(LV2_BUNDLE)
uninstall:
rm -rf $(LV2_DIR)/$(LV2_BUNDLE)
clean:
rm -rf $(LV2_BUNDLE)
.PHONY: all clean install install-link uninstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment