summaryrefslogtreecommitdiffhomepage
path: root/Makefile
blob: 3b36a8b88e41f321696e7919b36ecd8b69958ce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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

all: $(TARGET)

play:
	aplaymidi -p24 locked_out_of_heaven.midi

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)

clean:
	-rm -rf $(OBJS) $(TARGET)