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

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

#
#You should really edit /etc/group to limit access to ppplogin
#otherwise ppplogin has to be executable for the world.
#
SLIPGROUP = slip

TARGETS = ppplogin 

all: $(TARGETS)
	@echo done

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

clean:
	rm -f $(OBJ) core 

install: ppplogin
	install -m4754 ppplogin /sbin
	chgrp $(SLIPGROUP) /sbin/ppplogin
	@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 $<

