TARGET=midiplay SRCS=\ midiplay.cpp \ MIDIPlayer.cpp \ config.cpp \ OBJS=$(SRCS:.cpp=.o) CXX=clang++ CXXFLAGS=-Wall -g -O2 -fPIC -std=c++20 CXXLIBS=-lfcgi -lreichwein -lfmt -lasound CC=clang CFLAGS=-Wall -g -O2 -fPIC CLIBS=-lasound all: $(TARGET) aplaymidi-mp run-fcgi: spawn-fcgi -a 127.0.0.1 -p 9090 -n -- ./midiplay %.o: %.cpp $(CXX) $(CXXFLAGS) -o $@ -c $^ $(TARGET): $(OBJS) $(CXX) $(CXXFLAGS) -o $@ $^ $(CXXLIBS) aplaymidi-mp.o: aplaymidi-mp.c $(CC) $(CFLAGS) -o $@ -c $^ aplaymidi-mp: aplaymidi-mp.o $(CC) $(CFLAGS) -o $@ $^ $(CLIBS) clean: -rm -rf *.o $(TARGET) aplaymidi-mp