#
# Makefile for su2

CC=gcc

# NOTE: The following destination define is only used for installing
#        the manpage and binary.  There are still other files such as
#        /etc/super-users and /usr/adm/sulog that are defined
#        separately.
# 
DEST=/usr/local
BINDIR=$(DEST)/bin
MANDIR=$(DEST)/man

# OPTIONS:
# There are a number of DEFINES that can be used to configure su2.  Please
# see the source to su2.c for a full listing of all of the available options.

# Standard
OPTIONS=-DFULLPATH 

# m88k
# OPTIONS=-DFULLPATH -DNOVFORK

# NeXT
# OPTIONS=-DFULLPATH -DBSD

# Alpha OSF1
# OPTIONS=-DFULLPATH -DBROKENCUSERID

# Shadow Passwords (Solaris)
# OPTIONS=-DFULLPATH -DUSE_SHADOW

CFLAGS=-O $(OPTIONS)

su2:	su2.c

install: su2
	install -c -m 4711 -o root su2 $(BINDIR)/su2
	install -c su2.man $(MANDIR)/su2.1

clean:
	rm -f su2 *.o *.a
