6717c5bc8e86314bbd7e55c4bd73a308b293e461
[openafs.git] / src / rsh / Makefile
1 #
2 # Copyright (c) 1988 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, advertising
8 # materials, and other materials related to such redistribution and
9 # use acknowledge that the software was developed by the University
10 # of California, Berkeley.  The name of the University may not be
11 # used to endorse or promote products derived from this software
12 # without specific prior written permission.  THIS SOFTWARE IS PROVIDED
13 # ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
14 # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
15 # FITNESS FOR A PARTICULAR PURPOSE.
16 #
17 # @(#)Makefile  5.1 (Berkeley) 9/20/88
18 #
19 SHELL=/bin/sh
20 COMPONENT=rsh
21 include ../config/Makefile.${SYS_NAME}
22
23 INSTALL = ${SRCDIR}bin/install
24 LIBDIR = ${DESTDIR}lib/
25 INCLUDES= -I${SRCDIR}include
26 CFLAGS= ${DBUG} ${INCLUDES} ${XCFLAGS}
27 LIBC=   /lib/libc.a
28 OBJS=   rcmd.o ../inetd/ta-rauth.o herror.o
29 MAN=    
30 SRCS=   rsh.c rcmd.c ../inetd/ta-rauth.c herror.c AFS_component_version_number.c
31 AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}libubik.a\
32            ${LIBDIR}afs/libauth.a ${LIBDIR}afs/libsys.a \
33            ${LIBDIR}librx.a ${LIBDIR}liblwp.a ${DESTDIR}lib/librxkad.a\
34            ${LIBDIR}afs/libsys.a \
35            ${DESTDIR}lib/libdes.a ${LIBDIR}afs/libcmd.a \
36            ${LIBDIR}afs/libcom_err.a ${LIBDIR}afs/util.a
37 LIBS = ${AFSLIBS} 
38
39 include ../config/Makefile.version
40
41 all: rlogin rsh
42
43 system: install
44
45 rsh: rsh.o ${OBJS} ${LIBS}
46         ${CC} -o $@ ${CFLAGS}  rsh.o ${OBJS} ${LIBS} ${XLIBS}
47
48 rlogin: rlogin.o ${OBJS} ${LIBS}
49         ${CC} -o $@ ${CFLAGS} rlogin.o ${OBJS} ${LIBS} ${XLIBS}
50
51 rlogin.o: rlogin.c AFS_component_version_number.c
52 rsh.o: rsh.c AFS_component_version_number.c
53
54 ../rlogind/herror.o: ../rlogind/herror.c
55         (cd ../rlogind ; make herror.o )
56 ../inetd/ta-rauth.o : ../inetd/ta-rauth.c
57         (cd ../inetd ; make ta-rauth.o DESTDIR=${DESTDIR})
58
59 clean:
60         rm -f ${OBJS} core rsh *.BAK AFS_component_version_number.c
61
62 cleandir: clean
63         rm -f ${MAN} tags .depend
64
65 depend: ${SRCS}
66         mkdep -p ${CFLAGS} ${SRCS}
67
68 install: ${MAN} all
69         set -x; \
70         case "${SYS_NAME}" in \
71         hp* ) \
72                 ${INSTALL} -m 4755 -f rsh ${DESTDIR}bin/remsh ;; \
73         * ) \
74                 ${INSTALL} -m 4755 rsh ${DESTDIR}bin/rsh ;; \
75         esac
76
77 lint: ${SRCS}
78         lint ${CFLAGS} ${SRCS}
79
80 tags: ${SRCS}
81         ctags ${SRCS}