# $Source: /hpux/shared/supp//usr/src/cmd/getty/./makefile,v $
# $Revision: 72.2 $

# Common makefile for getty

FLAGS = -USYS_III -DETC_ISSUE -DHANGUP -DMRTS_ON

default: all

metrics: getty.M

all: getty

getty: getty.o
	libs="";						\
	if ifdef SecureWare || ifdef B1 || ifdef TRUSTED; then	\
	    libs="$$libs -lscmd -lsec -lcurses";		\
	fi;							\
	$(CC) $(CFLAGS) $(LDFLAGS) -o getty getty.o $$libs

getty.M: getty.c
	$(METRICS) $(CFLAGS) -o getty.M getty.c

clean:
	/usr/bin/rm -f *.o

clobber: clean
	/usr/bin/rm -f getty getty.M

#
# Re-define .c.o rule so compiles will use FLAGS macro as well as CFLAGS
#
.c.o:
	$(CC) $(CFLAGS) $(FLAGS) -c $<

