# makefile for TERMINAL SERVER SUPPORT SOFTWARE  
#
# @(#) 3.4.05  $Revision: 2.29 $
#
#	This makefile contains:
#		(a) a list of pre-defined targets
#		(b) a few hints on creating your own targets
#		(c) the pre-defined targets

#	LIST OF PRE-DEFINED TARGETS:
#	The groupings below represent those targets we've tried ourselves,
#	those that have been tried off-site recently (and so are reasonably
#	trustworthy) and those that we've had no feedback on recently.
#
#	System			    make <suffix> 
#	======			    =============
#
# In house:
#	Interactive 3.2 (SVR3)		ix
#	Olivetti 2.2 (SVR4)		olv4         
#	SCO UNIX 3.2.4			sco 
#	SCO XENIX 2.3.4			xen
#	Univel 4.2 (SVR4)		unv
#	Solaris 2.4			sol24
#	Red Hat Linux 4.0		redhat4
#	Red Hat Linux 5.x		redhat5
#	BSDi 3.0			bsdi3
#	FreeBSD 2.1.0			fbsd2

# Off site:
#	IBM AIX 4.1			aix4.1
#	HP-UX 11.x			hp11
#	HP-UX 10.01			hp10
#	HP-UX 9.04			hp9
#	HP-UX (8.x)			hp8
#	Interactive (SVR4)		ix4
#	Motorola 68k/88k (SVR3)		mot
#	Motorola 88k (SVR4)		mot4
#	NCR NST (SVR4)			ncr4
#	NetBSD 1.4.x                    nbsd14
#	Dynix 2.1			seq
#	SGI (IRIX 4.0.[15])		sgi
#	Solaris 2.3			sol2.3
#	Solaris 2.4			sol2.4

# Do not know:
#	AT&T        (SVR4)		att4
#	BULL System V.02.00		bul2
#	Data General Aviion	(SVR4)	dga
#	ICL 400 E   (SVR3)		icl3
#	ICL DRS6000 (SVR4)		icl4
#	MIPS				mips
#	Pyramid MIS 04/2T		pyr
#	SCO XENIX (no -DXENIX_TYPES)	xen2

#	HINTS:
#	If your compilation fails & some of the messages are about
#	    "memset not defined/not found"  OR
#	    "memcpy not defined/not found" 
#	Add -dBM to the compile line.  This will use alternative
#	definition for memset & memcpy.

#	PRE-DEFINED TARGETS START HERE:

CFLAGS	= 	-I/usr/include

# default target will be Interactive, for makes at Chase
# Edit this to suit your own environment.
default: hp10

ioland:
	@echo "    Do not use 'make" $@"', use make <target> instead."
	@echo "    A list of possible targets is included in the header of the makefile."

tcpcat tcpprint:
	@echo "    $@ has been replaced by ioland."
	@echo "    use ioland with the -T option for printing."

# For SCO UNIX systems.	      
sco:	ioland.c
#	cc -oioland -DDEFBUF -s ioland.c -lsocket -lpt
	cc -oioland -DDEFBUF -DCLONE -DEF -s ioland.c -lsocket -lpt

# For SCO XENIX systems (if "make xen" fails try "make xen2")
xen:	ioland.c
	cc -oioland -s -DXENIX -DXENIX_TYPES -DCHKRD ioland.c -lsocket

# For SCO XENIX systems (if "make xen2" fails try "make xen")
xen2:	ioland.c
	cc -s -DXENIX -DCHKRD -oioland ioland.c -lsocket
	
# Interactive Unix
ix: 	ioland.c
	cc -oioland -s -DDEFBUF -DCLONE ioland.c -linet -lpt
		
# SunOS 4.1.x
sun:
	@echo "    Try 'make sunos41'. This target assumes you have SunOS 4.1.x."
	@echo "	This target may not work on other versions of SunOS."

sunos41: ioland.c
	cc -DSUN -DCONN -DBSDPTY -s -o ioland ioland.c

sunos51: ioland.c
	cc -o ioland -DSUN -DBSDPTY -DCONN -DCLONE -DAUTOPUSH ioland.c

sol2.3:         ioland.c
	cc -o ioland -DSOL -DCONN -DCLONE -DAUTOPUSH ioland.c -lnsl -lsocket

sol2.4:         ioland.c
	cc -o ioland -DSOL24 -DADDR -DCLONE -DAUTOPUSH ioland.c -lnsl -lsocket

# AIX
aix:
	@echo "    Choose 'make aix3.2' or 'make aix4.1'."

aix3.1:	ioland.c
	cc -o ioland -s -DAIX31 ioland.c

aix3.2:	ioland.c
	cc -o ioland -s -DCLONE -DAIX32 ioland.c

aix4.1:	ioland.c
	cc -o ioland -s -DCLONE -DAIX32 ioland.c

# Interactive - UNIX System V release 4 
ix4:	ioland.c
	cc -o ioland -DCLONE -DAUTOPUSH -s ioland.c -dy -lsocket -lnsl

# AT&T - UNIX System V release 4  
att4:	ioland.c
	cc -o ioland -DCLONE -DAUTOPUSH ioland.c -lnet -lsocket -lnsl

# Univel - UNIX System V release 4 version 2
unv:	ioland.c
	cc -o ioland -s -DCLONE -DAUTOPUSH ioland.c -lsocket -lnsl

# MIPS
mips:	ioland.c
	cc -O3 -s -DMIPS -o ioland ioland.c -systype bsd43

# SGI
sgi:	ioland.c
	cc $(CFLAGS) -DSGI -DPTY_PER_JOB -o ioland ioland.c

# SEQUENT
seq:	ioland.c
	cc -DSEQUENT -DPTY_PER_JOB -o ioland ioland.c -lsocket -linet -lnsl -lseq

#ICL 400 E (SVR3)
icl3:	ioland.c
	cc -o ioland -DCLONE ioland.c -linet -lnet

#ICL DRS6000 (SVR4)
icl4:	ioland.c
	cc -o ioland -DCLONE -DAUTOPUSH ioland.c -lnsl -lsocket


# NCR NST
ncr4:	ioland.c
	cc -o ioland -DCLONE -DAUTOPUSH ioland.c -lnet -lnsl -lsocket

# Olivetti (SVR4)
olv4:	ioland.c
	cc -o ioland -DCLONE -DAUTOPUSH -s ioland.c -dy -lsocket -lnsl

hp:
	@echo "	If you have HP/UX 11, try 'make hp11'."
	@echo "	If you have HP/UX 10, try 'make hp10'."
	@echo "	If you have HP/UX 9, try 'make hp9'."
	@echo "	If you have HP/UX 8, try 'make hp8'."

# Hewlett Packard HP9000 HP-UX 11.x
hp11: ioland.c
	cc -DHP10 -DAUTOPUSH -DFTTY -DEF -s -o ioland ioland.c

# Hewlett Packard HP9000 816 series HP-UX 10.01
hp10: ioland.c
	cc -DHP10 -DAUTOPUSH -DFTTY -s -o ioland ioland.c

# Hewlett Packard HP9000 800 series HP-UX 9.04
hp9: ioland.c
	cc -DFTTY -DHP -DBSDPTY -DCHKRD -DCLONE -o ioland ioland.c

# Hewlett Packard HP-UX 9.x to 7.x
hp8: ioland.c
	cc -DHP -DBSDPTY -DCHKRD -o ioland ioland.c

# Pyramid MIS 04/2T
pyr:	ioland.c
	cc -o ioland ioland.c -lc

# BULL System V.02.00
bul2:	ioland.c
	cc -o ioland ioland.c -systype bsd43

# Motorola 68k/88k  System V Release 3
mot: 	ioland.c
	cc -DMOT3 -o ioland ioland.c -lnsl

# Motorola 88k System V Release 4
mot4:	ioland.c
	cc $(CFLAGS) -DMOT4 -o ioland -DCLONE -DAUTOPUSH ioland.c -lsocket -lnsl

# Data General Aviion - this target is written from memory, based on makefile
# seen once on a customer site.  It may not work, if you have problems Chase
# Technical Support may be able to help.

dga:	ioland.c
	cc -o ioland -DCLONE -DAUTOPUSH ioland.c 

redhat4:	ioland.c
	cc -oioland -DADDR -DLINUX -DRHLINUX4 -DBSDPTY -s ioland.c

redhat5:	ioland.c
	cc -oioland -DADDR -DLINUX -DRHLINUX5 -DBSDPTY -s ioland.c

bsdi3:	ioland.c
	cc -oioland -DADDR -DBSDPTY -DBSDI3 -s ioland.c

fbsd2:	ioland.c
	cc -oioland -DCONN -DADDR -DBSDPTY -DBSDI3 -s ioland.c

nbsd14:	ioland.c
	cc -oioland -DCONN -DADDR -DBSDPTY -DBSDI3 -s ioland.c


