1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that the above copyright notice and this paragraph are 7# duplicated in all such forms and that any documentation, 8# advertising materials, and other materials related to such 9# distribution and use acknowledge that the software was developed 10# by the University of California, Berkeley. The name of the 11# University may not be used to endorse or promote products derived 12# from this software without specific prior written permission. 13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)Makefile 1.17 (Berkeley) 11/14/89 18# 19 20# The following is the telnet makefile. The sources are down one level 21# in directory "Source" because the sources are shared between telnet 22# and tn3270. 23 24VPATH = Source 25INCLUDES= -ISource 26 27# 28# TERMCAP Define this if your system is termcap based, 29# otherwise a terminfo based system is assumed. 30# 31# SRCRT Includes code to allow you to specify source routes. 32# Format is: 33# [!]@hop1@hop2...[@|:]dst 34# Leading ! means strict source route. 35# 36# USE_TERMIO Define this if you have System V termio structures. 37# What is here is how things are on Cray computers. 38# 39# KLUDGELINEMODE Define this to get the kludged up version of linemode 40# that was in 4.3BSD. This is a good thing to have 41# around for talking to older systems. 42# 43# NOSTRNCASECMP Define this if you do not have strncasecmp() in 44# your C libarary. 45# 46# strrchr=rindex Define this if you do not have strrchr() in your 47# C libaray (but you do have rindex...) 48# 49 50DEFINES= -DTERMCAP -DSRCRT -DKLUDGELINEMODE -DUSE_TERMIO 51 52# 53# LIBS should be set to any libraries that need to be included, 54# like the termcap or terminfo library. LIBPATH is the paths 55# to these libraries, for dependencies. 56# For CRAY: LIBS= -lcurses -lnet 57# 58LIBS= -ltermcap 59LIBPATH= /lib/libc.a /usr/lib/libtermcap.a 60 61SRCS= commands.c main.c network.c ring.c \ 62 sys_bsd.c telnet.c terminal.c \ 63 tn3270.c utilities.c 64 65CFLAGS= -O ${INCLUDES} ${DEFINES} 66 67ALLHC= ${SRCS} \ 68 Source/defines.h Source/externs.h Source/fdset.h Source/general.h \ 69 Source/ring.h Source/types.h 70 71OBJS= commands.o main.o network.o ring.o sys_bsd.o \ 72 telnet.o terminal.o tn3270.o utilities.o 73MAN= telnet.0 74 75# 76# 4.4BSD 77# DEST=${DESTDIR}/usr/bin 78# 79# 4.3BSD 80# DEST=${DESTDIR}/usr/ucb 81# 82DEST=${DESTDIR}/usr/bin 83 84# 85# These next three lines are not needed in 4.4BSD 86# 87# .SUFFIXES: .0 .1 88# .1.0: 89# nroff -man -h $< > $@ 90 91all: telnet 92 93telnet: ${OBJS} ${LIBPATH} 94 ${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS} 95 96clean: FRC 97 rm -f ${OBJS} core errs l.errs telnet 98 99cleandir: clean 100 rm -f ${MAN} tags .depend 101 102clist: FRC ${SRCS} 103 @for i in ${SRCS} ; \ 104 do (echo ${DIRPATH}$$i); done 105 106hclist: FRC ${ALLHC} 107 @for i in ${ALLHC} ; \ 108 do (echo ${DIRPATH}$$i); done 109 110depend: FRC ${SRCS} 111 mkdep ${CFLAGS} `make clist` 112 113install: ${MAN} FRC 114 install -s -o bin -g bin -m 755 telnet ${DEST} 115 install -c -o bin -g bin -m 444 telnet.0 ${DESTDIR}/usr/man/cat1 116 117lint: FRC ${SRCS} 118 lint ${CFLAGS} `make clist` 119 120tags: FRC ${SRCS} 121 ctags `make hclist` 122 123FRC: 124