#---- configured by Configure revision 3.20 for ECU 3.26
#---- edit ./ecuungetty/Make.src and rerun Configure to produce this file

SIGTYPE = void

CC = gcc
CFLAGS = \
	-traditional -O \
	-fstrength-reduce -fpcc-struct-return -fwritable-strings \
	-finline-functions -fforce-mem -fforce-addr \
	-W -Wunused -Wpointer-arith -Wcast-qual -Wshadow -Wcomment -Wswitch\
	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
	-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -Dunix -Di386\
	-DLINUX \
	-DUSE_ECUUNGETTY \
	-DSIGTYPE=$(SIGTYPE) \
	-DLOCK_DIR_NAME='"/usr/spool/uucp"' \
	-DGCC140 \
	-DDEFAULT_TTY='"/dev/ttyS1"' \
	-DDEFAULT_BAUD_RATE=2400 \
	-DDEFAULT_PARITY="'n'" \
	-DHDBLIBDIR='"$(HDBLIBDIR)"' \
	-DECULIBDIR='"$(ECULIBDIR)"' -DECUUNGETTY_CHOWN \
	-DPID_T=int \
	$(SYMBOLIC) $(CFLAGS_EXTRA) $(GCC_CFLAGS_EXTRA) $(LOCAL_CFLAGS)

LDFLAGS = \
	$(SYMBOLIC) $(LDFLAGS_EXTRA)

LBIN = /usr/bin
ECULIBDIR = /usr/lib/ecu
SYSTEM = UNIX/386
HDBLIBDIR = /usr/lib/uucp
USE_ECUUNGETTY = yes
#BINTIME = /bin/time

#---- end of configured make variables
#+---------------------------------------------------------------
# Makefile for ecuungetty
# wht@n4hgf.Mt-Park.GA.US
#
# must be root to run make install
#----------------------------------------------------------------
#+:EDITS:*/
#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
#:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA
#:02-10-1992-05:47-wht@n4hgf-mcs avail on some systems when non-COFF produced
#:07-25-1991-12:57-wht@n4hgf-ECU release 3.10
#:04-21-1991-12:05-wht@n4hgf-convert to Make.src

SHELL = /bin/sh
PROGRAM = ecuungetty
INSTALLABLE = $(ECULIBDIR)/$(PROGRAM)

.SUFFIXES:
.SUFFIXES: .c .o .h

.c.o:;	$(BINTIME) $(CC) -c $(CFLAGS) $*.c 

SRC = \
	ecuungetty.c

OBJ = \
	../ecuuclc.o\
	../ecuLCK.o\
	../utmpstat.o\
	../bamboozle.o\
	../ttynaming.o\
	ecuungetty.o

all: $(PROGRAM)

$(PROGRAM): $(OBJ)
	$(BINTIME) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)

$(OBJ): Makefile

install: $(PROGRAM)
	../makedirs -m 755 $(ECULIBDIR)
	rm -f $(INSTALLABLE)
	if [ -f $(INSTALLABLE) ]; then mv $(INSTALLABLE) $(INSTALLABLE)~; fi
	cp $(PROGRAM) $(INSTALLABLE)
	strip $(INSTALLABLE)
	-if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $(INSTALLABLE); fi
	chown root $(INSTALLABLE)
	chgrp bin $(INSTALLABLE)
	chmod 4711 $(INSTALLABLE)

neat:
	rm -f .make.* depend.tmp eddep.tmp Makefile.new *.bak *.BAK
	rm -f core tags cscope.out
	-rm -f *~ *# *.orig *.rej make.log a.out

clean: neat
	rm -f $(PROGRAM).o

clobber: clean
	rm -f $(PROGRAM)

../bamboozle.o: ../bamboozle.c
	cd ..;make bamboozle.o

../utmpstat.o: ../utmpstat.c
	cd ..;make utmpstat.o

../ecuuclc.o: ../ecuuclc.c
	cd ..;make ecuuclc.o

../ecuLCK.o: ../ecuLCK.c
	cd ..;make ecuLCK.o

../ttynaming.o: ../ttynaming.c
	cd ..;make ttynaming.o

#regenerate .o:.h dependencies automatically
depend:
	rm -f depend.tmp
	if test '$(SRC)' ;\
	then (grep '^#include' $(SRC) \
	| sed	-e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
		-e 's?:[^"]*"\([^"]*\)".*?: \1?'\
		-e 's?\(.*\)\.c?\1.o?'\
	 >> depend.tmp) ;\
	fi

	echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
	echo '.+1,$$d' >>eddep.tmp
	echo 'r depend.tmp' >> eddep.tmp
	echo 'w' >> eddep.tmp
	cp Makefile Makefile.new
	ed Makefile.new < eddep.tmp
	rm eddep.tmp depend.tmp
	echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
	echo '# see make depend above'>>Makefile.new
	mv Makefile Makefile.bak
	mv Makefile.new Makefile

# DO NOT DELETE THIS LINE
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
