parse midi messages with ALSA sequencer API, and output SPI message to MCP4921 DAC for controlling an analog synthesizer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
779 B

CXX=g++
CXXFLAGS= -std=c++11 -g -ggdb3 -Wall
LDFLAGS=-lasound -lgpiod
# NOTE: add an environment variable to detect breaking API changes with
# libgpiod
LIBGPIOD_VERSION := $(shell pkgconf --modversion libgpiod | cut -f 1 -d.)
CXXFLAGS += -D LIBGPIOD_VERSION=$(LIBGPIOD_VERSION)
OBJDIR = build
SRCDIR = src
BINDIR = bin
BIN = $(BINDIR)/midi_to_cv
SOURCES = $(wildcard $(SRCDIR)/*.cpp)
OBJECTS = $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SOURCES))
all: mkdirs $(OBJECTS)
ctags -R ./ /usr/include/alsa/
$(CXX) -o $(BIN) $(OBJECTS) $(LDFLAGS)
.PHONY: all
mkdirs:
mkdir -p $(BINDIR) $(OBJDIR)
.PHONY: mkdirs
-include $(OBJDIR)/*.d
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -c -MMD $< -o $@
clean:
rm -rf $(BIN)
rm -rf build/*
.PHONY: clean