CC = gcc
CFLAGS = -O2 -include /usr/include/bsd/bsd.h -I/usr/include/bsd
LDFLAGS =-N -s
LDLIBS = -lbsd
PROG = inetd access_on
ATHBINDIR=/usr/athena/bin

all: $(PROG)

inetd: inetd.o

access_on: access_on.o

clean:
	rm -f *.o *~ core

clobber: clean
	rm -f $(PROG)

install: $(PROG)
	install -c -m 555 inetd $(DESTDIR)/sbin/inetd
	install -c -o root -m 4555 access_on $(DESTDIR)/$(ATHBINDIR)/access_on
	rm -f $(DESTDIR)$(ATHBINDIR)/access_off
	ln -s $(DESTDIR)$(ATHBINDIR)/access_on $(DESTDIR)$(ATHBINDIR)/access_off
	install -c -m 444 inetd.8 $(DESTDIR)/usr/man/man8
	install -c -m 444 access_on.1 $(DESTDIR)/usr/athena/man/man1
