diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 41 |
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 |