summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-19 16:22:55 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-19 16:22:55 +0100
commit926be3b8db12d9105a49f8a9a5f695f12d7aea12 (patch)
treeae6dd7c14e880833790f68e525e9ca0fd03f4ea0 /Makefile
parent321eaa65109a6ab18344901dfc4dd8cc4b82367d (diff)
Debian package
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2665ec8..c04d4c3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-TARGET=midiplay
+TARGET=midiplay-fcgi
SRCS=\
midiplay.cpp \
@@ -9,16 +9,20 @@ OBJS=$(SRCS:.cpp=.o)
CXX=clang++
CXXFLAGS=-Wall -g -O2 -fPIC -std=c++20
+# workaround for Debian dh_dwz:
+CXXFLAGS+=-gdwarf-4
CXXLIBS=-lfcgi -lreichwein -lfmt -lasound
CC=clang
CFLAGS=-Wall -g -O2 -fPIC
+# workaround for Debian dh_dwz:
+CFLAGS+=-gdwarf-4
CLIBS=-lasound
all: $(TARGET) aplaymidi-mp
run-fcgi:
- spawn-fcgi -a 127.0.0.1 -p 9090 -n -- ./midiplay
+ spawn-fcgi -a 127.0.0.1 -p 9090 -n -- ./midiplay-fcgi
%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $^
@@ -32,5 +36,12 @@ aplaymidi-mp.o: aplaymidi-mp.c
aplaymidi-mp: aplaymidi-mp.o
$(CC) $(CFLAGS) -o $@ $^ $(CLIBS)
+install:
+ mkdir -p $(DESTDIR)/usr/bin
+ cp midiplay $(DESTDIR)/usr/bin
+ cp aplaymidi-mp $(DESTDIR)/usr/bin
+ mkdir -p $(DESTDIR)/usr/lib/midiplay
+ cp $(TARGET) $(DESTDIR)/usr/lib/midiplay
+
clean:
-rm -rf *.o $(TARGET) aplaymidi-mp