summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-12 17:57:49 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-12 17:57:49 +0100
commit6ba60f7329811a4bb3a07b1e6d81156d7f3a4ac3 (patch)
treeef35f8a046e8d679f4baef3c14a421e52eae9e15 /Makefile
parent208a484ca309a4919f83a385f402272039817ed9 (diff)
Added MIDIPlayer (WIP)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 5f24c4e..7ceb738 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,15 @@
TARGET=midiplay
+SRCS=\
+ midiplay.cpp \
+ MIDIPlayer.cpp
+
+OBJS=$(SRCS:.cpp=.o)
+
+CXX=clang++
+CXXFLAGS=-Wall -g -O2 -fPIC -std=c++20
+CXXLIBS=-lfcgi -lreichwein -lfmt
+
all: $(TARGET)
play:
@@ -8,12 +18,11 @@ play:
run-fcgi:
spawn-fcgi -a 127.0.0.1 -p 9090 -n -- ./midiplay
-midiplay.o: midiplay.cpp
- g++ -Wall -g -O2 -fPIC -o $@ -c $^
-
-$(TARGET): midiplay.o
- g++ -Wall -g -O2 -fPIC -o $@ $^ -lfcgi -lreichwein -lfmt
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -o $@ -c $^
+$(TARGET): $(OBJS)
+ $(CXX) $(CXXFLAGS) -o $@ $^ $(CXXLIBS)
clean:
-rm -rf $(TARGET)