# Makefile for linux dynamic VC utilities
# Edit below to suit your preferences...
# don't forget to edit config.h as well!

CC=gcc
CFLAGS=-Wall -Wno-format -O2 -pedantic -fomit-frame-pointer -I.. ${TTYDEFS}
LDFLAGS=$(CFLAGS) -s -N
INSTALL=install

SBINDIR=/sbin
BINDIR=/usr/bin
MANDIR=/usr/man

# file owners
ROOT=root
BIN=bin
MAN=man
MANMODE=664

# comment this out to inhibit changing the owners/modes of ttys.
# otherwise edit the three definitions below.  See the README.

TTYDEFS=-DTTYUSER=\"${TTYUSER}\" -DTTY=\"${TTY}\" -DTTYMODE=0${TTYMODE}

# this is the owner for ttys.
TTYUSER=root
# this is the group for ttys.
TTY=tty
# this is the mode that ttys should have (in octal)
TTYMODE=0620

#------- you shouldn't need to edit below here
SUBDIRS=open-1.3 src
.EXPORT_ALL_VARIABLES:

all:
	@for i in ${SUBDIRS}; do (cd $$i; ${MAKE} all); done

clean:
	@for i in ${SUBDIRS}; do (cd $$i; ${MAKE} clean); done

realclean:
	@for i in ${SUBDIRS}; do (cd $$i; ${MAKE} realclean); done

install: 
	@for i in ${SUBDIRS}; do (cd $$i; ${MAKE} install); done

setuid:
	@for i in ${SUBDIRS}; do (cd $$i; ${MAKE} setuid); done
