MANPATH=/usr/share/man/

.PHONY: all clean install

all: btnd

clean: 
	[ -f btnd ] && rm btnd || true

install: all
	install -g root -o root -m 755 -s btnd              -t $(DESTDIR)/usr/sbin
	install -g root -o root -m 644    btnd.conf.example -T $(DESTDIR)/etc/btnd.conf
	install -g root -o root -m 644    btnd.8            -t $(DESTDIR)$(MANPATH)/man8 
	install -g root -o root -m 644    btnd.conf.5       -t $(DESTDIR)$(MANPATH)/man5
	gzip $(DESTDIR)$(MANPATH)/man8/btnd.8
	gzip $(DESTDIR)$(MANPATH)/man5/btnd.conf.5

btnd: btnd.c

