xref: /original-bsd/usr.bin/telnet/Makefile (revision 04ace372)
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.16 (Berkeley) 09/01/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# NOSTRNCASECMP	Define this if you do not have strncasecmp() in
37#		your C libarary.
38#
39# USE_TERMIO	Define this if you have System V termio structures.
40#		What is here is how things are on Cray computers.
41#
42# KLUDGELINEMODE Define this to get the kludged up version of linemode
43#		that was in 4.3BSD.  This is a good thing to have
44#		around for talking to older systems.
45#
46
47DEFINES= -DTERMCAP -DSRCRT -DKLUDGELINEMODE
48
49#
50# LIBS should be set to any libraries that need to be included,
51# like the termcap or terminfo library.  LIBPATH is the paths
52# to these libraries, for dependencies.
53#	For CRAY: LIBS= -lcurses -lnet
54#
55LIBS=	-ltermcap
56LIBPATH= /lib/libc.a /usr/lib/libtermcap.a
57
58SRCS=	commands.c main.c network.c ring.c \
59	sys_bsd.c sys_dos.c telnet.c terminal.c \
60	tn3270.c utilities.c
61
62CFLAGS=	-O ${INCLUDES} ${DEFINES}
63
64ALLHC=	${SRCS} \
65	Source/defines.h Source/externs.h Source/fdset.h Source/general.h \
66	Source/ring.h Source/types.h
67
68OBJS=	commands.o main.o network.o ring.o sys_bsd.o sys_dos.o \
69	telnet.o terminal.o tn3270.o utilities.o
70MAN=	telnet.0
71
72all: telnet
73
74telnet:	${OBJS} ${LIBPATH}
75	${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS}
76
77clean: FRC
78	rm -f ${OBJS} core errs l.errs telnet
79
80cleandir: clean
81	rm -f ${MAN} tags .depend
82
83clist:	FRC ${SRCS}
84	@for i in ${SRCS} ; \
85		do (echo ${DIRPATH}$$i); done
86
87hclist:	FRC ${ALLHC}
88	@for i in ${ALLHC} ; \
89		do (echo ${DIRPATH}$$i); done
90
91depend: FRC ${SRCS}
92	mkdep ${CFLAGS} `make clist`
93
94install: ${MAN} FRC
95	install -s -o bin -g bin -m 755 telnet ${DESTDIR}/usr/bin
96	install -c -o bin -g bin -m 444 telnet.0 ${DESTDIR}/usr/man/cat1
97
98lint: FRC ${SRCS}
99	lint ${CFLAGS} `make clist`
100
101tags: FRC ${SRCS}
102	ctags `make hclist`
103
104FRC:
105