aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-06-01 12:49:51 +0200
committerMattias Andrée <maandree@kth.se>2024-06-01 12:49:51 +0200
commiteea8979a05b2cbabfc19b9d49ea3dbf603c9f53d (patch)
tree65efd625859f08c7a6100635bf94fb35babee5c0 /Makefile
downloadalsause-eea8979a05b2cbabfc19b9d49ea3dbf603c9f53d.tar.gz
alsause-eea8979a05b2cbabfc19b9d49ea3dbf603c9f53d.tar.bz2
alsause-eea8979a05b2cbabfc19b9d49ea3dbf603c9f53d.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..31cea4c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+.POSIX:
+
+CONFIGFILE = config.mk
+include $(CONFIGFILE)
+
+OBJ =\
+ alsause.o
+
+HDR =
+
+all: alsause
+$(OBJ): $(HDR)
+
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+
+alsause: $(OBJ)
+ $(CC) -o $@ $(OBJ) $(LDFLAGS)
+
+install: alsause
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
+ cp -- alsause "$(DESTDIR)$(PREFIX)/bin/"
+ cp -- alsause.1 "$(DESTDIR)$(MANPREFIX)/man1/"
+
+post-install:
+ chown -- '0:0' "$(DESTDIR)$(PREFIX)/bin/alsause"
+ chmod -- 4755 "$(DESTDIR)$(PREFIX)/bin/alsause"
+
+uninstall:
+ -rm -f -- "$(DESTDIR)$(PREFIX)/bin/alsause"
+ -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/alsause.1"
+
+clean:
+ -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda
+ -rm -f -- alsause
+
+.SUFFIXES:
+.SUFFIXES: .o .c
+
+.PHONY: all install post-install uninstall clean