aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 31cea4c310cc81d9fec30823463e9410e4253d65 (plain) (tree)








































                                                                          
.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