# Makefile for linux dynamic VC utilities tjd

PROGS=cspawnd close
MAN1=close.1
MAN8=cspawnd.8

all: ${PROGS}

clean:
	rm -f *.o

realclean: clean
	rm -f ${PROGS}

install: ${PROGS}
	install -c -o ${ROOT} -m 700 cspawnd ${SBINDIR}
	install -c -o ${BIN} -g ${BIN} -m 711 close ${BINDIR}
	install -c -o ${MAN} -g ${MAN} -m ${MANMODE} ${MAN1} ${MANDIR}/man1
	install -c -o ${MAN} -g ${MAN} -m ${MANMODE} ${MAN8} ${MANDIR}/man8

setuid: install
	chgrp ${TTY} ${BINDIR}/close
	chmod 2711 ${BINDIR}/close

# -- dependencies --
cspawnd: cspawnd.o open_getty.o utmp.o
close: close.o 

cspawnd.c: ../config.h
open_getty.c: ../config.h
close.c: ../open-1.3/open.h

