all: telnetlogin

include ../MCONFIG
include ../MRULES

OBJS = telnetlogin.o

telnetlogin: $(OBJS)
	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@

$(OBJS): ../version.h

install: telnetlogin
	install -d $(INSTALLROOT)$(SBINDIR)
	install -s -m4750 -oroot -gtelnetd telnetlogin $(INSTALLROOT)$(SBINDIR)
	install -d $(INSTALLROOT)$(MANDIR)/man8
	install -m$(MANMODE) telnetlogin.8 $(INSTALLROOT)$(MANDIR)/man8

clean:
	rm -f *.o telnetlogin
