CC = gcc
LINK = $(CC)
OPTS = -O2 -pipe -fomit-frame-pointer -m486 #-Wall
LDFLAGS = -s

SRC = sliplogin.c
OBJ = $(SRC:.c=.o)
LIBS = # -lshadow

#
#You should really edit /etc/group to limit access to sliplogin
#otherwise sliplogin has to be executable for the world.
#

TARGETS = sliplogin 

all: $(TARGETS)
	@echo done

sliplogin: $(OBJ) 
	$(LINK) $(OBJ) $(LIBS) $(LDFLAGS) -o $@

clean:
	rm -f $(OBJ) core sliplogin

install: sliplogin
	install -s -o root -g dip -m 4750 sliplogin ${DEBDIR}/usr/sbin
	install -o root -g root -m 0644 sliplogin.8 ${DEBDIR}/usr/man/man8
	install -o root -g root -m 0644 TROUBLE_SHOOTING ${DEBDIR}/usr/doc/net/sliplogin.trouble.txt
	install -o root -g root -m 0644 README.dynamic ${DEBDIR}/usr/doc/net/sliplogin.dynamic.txt
	gzip -9fv ${DEBDIR}/usr/doc/net/sliplogin.trouble.txt
	gzip -9fv ${DEBDIR}/usr/doc/net/sliplogin.dynamic.txt
#	install -o root -g root -m 0644 slip.hosts ${DEBDIR}/etc
#	install -o root -g root -m 0755 slip.login ${DEBDIR}/etc
#	install -o root -g root -m 0755 slip.logout ${DEBDIR}/etc
#	install -o root -g root -m 0644 slip.tty ${DEBDIR}/etc
#	@echo "Don't forget to edit slip.hosts, slip.login and slip.logout"
#	@echo "and copy these files to the proper place (/etc)."

depend:
	makedepend $(SRC)

ci:
	ci -m"I hate log messages!" -t-"I hate description prompts!" -l $(SRC) Makefile

co:
	co $(SRC) Makefile

.c.o: 
	$(CC) $(OPTS) -c $<

