# Sweep v1.07 (Root Shell Security Program) - Makefile
# Last Updated: 9/12/97
# Written by Tom Dyas              tdyas@usacs.rutgers.edu
#        and Manish Vachharajani   mvachhar@usacs.rutgers.edu
# Public Domain with the "It's all your fault!" guarantee.

# If you are installing sweep for the first time, make sure that the GROUP
# macro is defined to the name of the group that you want sweep to check
# before it grants a root shell to an authorized user. After this is done,
# create the $(GROUP) in your /etc/group file and add root and any other
# usernames that you want to grant root access to.

# To compile a copy of sweep on your system, first make sure that the
# BINDIR macro points to an accesible location on your ROOT parition such as
# /bin or /sbin. If you do not do this and one of the partitions should
# become unmounted, then sweep and your root access will be inaccessible.

# These are the steps needed to install sweep:
#  1) Make sure you are the superuser.
#  2) make sweep
#  3) make install

# To install the man page, type this as root:
#     make man


GROUP  = sweep
BINDIR = /bin
MANDIR = /usr/local/man

CC = gcc
#CFLAGS = -Wall -Wstrict-prototypes -O2
CFLAGS = -Wall -Wstrict-prototypes -g
LDFLAGS = -static
OBJS = sweep.o

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

sweep: $(OBJS)
	$(CC) $(LDFLAGS) -o sweep $(OBJS)

install: sweep
	strip sweep
	cp sweep $(BINDIR)/sweep
	chown root $(BINDIR)/sweep
	chgrp $(GROUP) $(BINDIR)/sweep
	chmod 4511 $(BINDIR)/sweep

install-man: sweep.1
	cp sweep.1 $(MANDIR)/man1/sweep.1

clean:
	rm -f *~

distclean: clean
	rm -f $(OBJS) sweep
