0dac9d41edb60da4998fbcbfcbb642fdcc00f90d
[openafs.git] / src / rsh / Makefile.in
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 DESTDIR=@DESTDIR@
20 SRCDIR=@SRCDIR@
21 TOP_SRCDIR=@TOP_SRCDIR@
22 SYS_NAME=@AFS_SYSNAME@
23
24 SHELL=/bin/sh
25
26 include ../config/Makefile.${SYS_NAME}
27
28 LIBDIR = ${DESTDIR}/lib/
29 INCLUDES= -I${TOP_SRCDIR}/config -I${SRCDIR}/include
30 CFLAGS= ${DBUG} ${INCLUDES} ${XCFLAGS}
31 LIBC=   /lib/libc.a
32 OBJS=   rcmd.o ../inetd/ta-rauth.o herror.o
33 MAN=    
34 SRCS=   rsh.c rcmd.c ../inetd/ta-rauth.c herror.c AFS_component_version_number.c
35 AFSLIBS =  ${LIBDIR}/afs/libkauth.a ${LIBDIR}/libubik.a\
36            ${LIBDIR}/afs/libauth.a ${LIBDIR}/afs/libsys.a \
37            ${LIBDIR}/librx.a ${LIBDIR}/liblwp.a ${DESTDIR}/lib/librxkad.a\
38            ${LIBDIR}/afs/libsys.a \
39            ${DESTDIR}/lib/libdes.a ${LIBDIR}/afs/libcmd.a \
40            ${LIBDIR}/afs/libcom_err.a ${LIBDIR}/afs/util.a
41 LIBS = ${AFSLIBS} 
42
43 include ../config/Makefile.version
44
45 all: rlogin rsh
46
47 system: install
48
49 rsh: rsh.o ${OBJS} ${LIBS}
50         ${CC} -o $@ ${CFLAGS} rsh.o ${OBJS} ${LIBS} ${XLIBS}
51
52 rlogin: rlogin.o ${OBJS} ${LIBS}
53         ${CC} -o $@ ${CFLAGS} rlogin.o ${OBJS} ${LIBS} ${XLIBS}
54
55 rlogin.o: rlogin.c AFS_component_version_number.c
56 rsh.o: rsh.c AFS_component_version_number.c
57
58 ../rlogind/herror.o: ../rlogind/herror.c
59         (cd ../rlogind ; $(MAKE) herror.o )
60 ../inetd/ta-rauth.o : ../inetd/ta-rauth.c
61         (cd ../inetd ; $(MAKE) ta-rauth.o DESTDIR=${DESTDIR})
62
63 clean:
64         $(RM) -f ${OBJS} core rsh *.BAK AFS_component_version_number.c rlogin rlogin.o rsh.o
65
66 cleandir: clean
67         $(RM) -f ${MAN} tags .depend
68
69 depend: ${SRCS}
70         mkdep -p ${CFLAGS} ${SRCS}
71
72 install: ${MAN} all
73         set -x; \
74         case "${SYS_NAME}" in \
75         hp* ) \
76                 ${INSTALL} -m 4755 -f rsh ${DESTDIR}/bin/remsh ;; \
77         * ) \
78                 ${INSTALL} -m 4755 rsh ${DESTDIR}/bin/rsh ;; \
79         esac