#! /bin/make -f
# $Id: makefile 1.6 1994/06/11 19:16:41 Ezra_Story Exp $
#
# General Defines:
#   TERMIO      define this if your system uses termio, not termcap
#   TCATTR      define this if your system uses tc(get|set)attr
#               instead of ioctl with termio.
#   USEGETPTY   define this if you system has _getpty()
#   NODTABLE    define this if your system lacks the getdtablesize
#               call
#   NOCONFIG    define this if you're ignoring the autoconfiguration
#   NOPUTENV    define this if your system has no putenv() call.
#   USESETSID   define this if your system has (or needs) setsid().
#   STRUCTWAIT  define this if your system uses "union wait" for
#               wait3()
#   STRING      #include string.h instead of strings.h
#   SYSSELECT   #include <sys/select.h>
#   USETCFLUSH  use tcflush() (SYSV openpty code)
#
# system defines: 
#
# (some of thse are auotdefined, some must be added to the CFLAGS line)
# (i.e. CFLAGS = -Dsolaris2)
#
#   SYSV        for SysV systems 
#   SVR4        for SYSVR4 systems (includes SYSV)
#   ultrix      for MIPS ultrix
#   __hpux      HP/UX
#   sun         SunOS 4
#   solaris2    SunOS 5 (solaris 2)
#   __osf__     OS/F
#   __NeXT__    Next (3.0)
#  sgi          Irix (must uncomment line below)
#
# uncomment this for sgi
#
#CFLAGS =       -cckr
#
# uncomment the following lines for AIX
#
#CC =           bsdcc
#CFLAGS =       -lbsd -DSTRUCTWAIT
#
# the default.. recomment this if you're using something else
# otherwise it will nullify the lines above.
#
CFLAGS = 

# What c compiler to use (recomment this for AIX)
CC =            cc

SOURCES =       main.c openpty.c protocol.c tty.c windows.c lists.c

OBJECTS =       main.o openpty.o protocol.o tty.o windows.o lists.o

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

all:	clean config auw

auw:	pprotos.h $(OBJECTS)
	$(CC) -s $(CFLAGS) -o auw $(OBJECTS)


pprotos.h:    $(SOURCES)
	sed -n -e "/^proto/ p" *.c > pprotos.h

clean:
	-rm $(OBJECTS) pprotos.h

config:
	csh -f ./configure

tar:
	-rm amuw.tar
	tar cf amuw.tar *.[ch] makefile configure README_NOW

lha:
	-rm uwsrc.lzh
	lha a uwsrc.lzh *.[ch] makefile configure README_NOW

