summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3b36a8b..2665ec8 100644
--- a/Makefile
+++ b/Makefile
@@ -11,10 +11,11 @@ CXX=clang++
CXXFLAGS=-Wall -g -O2 -fPIC -std=c++20
CXXLIBS=-lfcgi -lreichwein -lfmt -lasound
-all: $(TARGET)
+CC=clang
+CFLAGS=-Wall -g -O2 -fPIC
+CLIBS=-lasound
-play:
- aplaymidi -p24 locked_out_of_heaven.midi
+all: $(TARGET) aplaymidi-mp
run-fcgi:
spawn-fcgi -a 127.0.0.1 -p 9090 -n -- ./midiplay
@@ -25,5 +26,11 @@ run-fcgi:
$(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 $(OBJS) $(TARGET)
+ -rm -rf *.o $(TARGET) aplaymidi-mp