TARGET=click default: $(TARGET) SRCS= \ MainLoop.cpp \ main.cpp \ MIDI.cpp \ PCM.cpp \ config.cpp \ UI.cpp \ Timer.cpp \ debug.cpp \ cpuload.cpp \ log.cpp \ NoteClick.cpp \ ClockClick.cpp \ InternalClick.cpp \ BPMDetect.cpp \ Touchpad.cpp \ PIDFile.cpp \ Temperature.cpp \ HEADERS=$(SRCS:.cpp=.h) OBJS=$(SRCS:.cpp=.o) CXX=clang++ ifeq ($(CXXFLAGS),) CXXFLAGS=-O2 -g endif CXXFLAGS+=-std=c++20 -Wall -Wpedantic # workaround for Debian dh_dwz: CXXFLAGS+=-gdwarf-4 CXXFLAGS+=-I/usr/include/libevdev-1.0 CXXLIBS=$(shell pkg-config --libs alsa) -lreichwein -lfmt -lasound -levdev $(TARGET): $(OBJS) $(CXX) $^ -o $@ $(CXXLIBS) %.o: %.cpp $(CXX) $(CXXFLAGS) -o $@ -c $< install: mkdir -p $(DESTDIR)/usr/bin cp $(TARGET) $(DESTDIR)/usr/bin mkdir -p $(DESTDIR)/usr/lib/click/media cp media/click.s16le $(DESTDIR)/usr/lib/click/media clean: rm -f $(TARGET) $(OBJS) sound: ffmpeg -i media/click.wav -f s16le media/click.s16le