all: rwho

include ../MCONFIG
include ../MRULES

CFLAGS += -I../include

rwho: rwho.o
	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@

rwho.o: ../version.h

install: rwho
	install -d $(INSTALLROOT)$(BINDIR)
	install -s -m$(BINMODE) rwho $(INSTALLROOT)$(BINDIR)
	install -d $(INSTALLROOT)$(MANDIR)/man1
	install -m$(MANMODE) rwho.1 $(INSTALLROOT)$(MANDIR)/man1

clean:
	rm -f *.o rwho

