afsconfig-and-rcsid-all-around-20010705
[openafs.git] / src / rlogind / 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.3 (Berkeley) 9/20/88
18 #
19
20 SHELL=/bin/sh
21 COMPONENT=rlogind
22 include ../config/Makefile.${SYS_NAME}
23
24 LIBC=   /lib/libc.a
25 SRCS=   rlogind.c ../rsh/rcmd.c ../rsh/herror.c ../inetd/ta-rauth.c
26 OBJS=   rlogind.o ../rsh/rcmd.o ../rsh/herror.o ../inetd/ta-rauth.o
27 MAN=
28 LIBDIR = ${DESTDIR}lib/
29 AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}afs/libprot.a ${LIBDIR}libubik.a\
30                    ${LIBDIR}afs/libauth.a ${DESTDIR}lib/librxkad.a ${LIBDIR}afs/libsys.a \
31                    ${LIBDIR}librx.a ${LIBDIR}liblwp.a \
32                    ${LIBDIR}afs/libsys.a \
33                    ${DESTDIR}lib/librxkad.a ${DESTDIR}lib/libdes.a \
34                    ${LIBDIR}afs/libcmd.a ${LIBDIR}afs/libcom_err.a ${LIBDIR}afs/util.a ${LIBDIR}afs/libaudit.a
35 RES = 
36 LIBS = ../login/libutil.a ${RES} ${AFSLIBS}
37 ALIBS= ${AFSLIBS} 
38 CFLAGS= ${OPTMZ} -I${TOP_SRCDIR}/config -I${DESTDIR}include ${XCFLAGS}
39
40 include ../config/Makefile.version
41
42 all: rlogind rexecd
43
44 system: install
45
46 rlogind: ${OBJS} ${LIBS} ../login/libutil.a
47         case ${SYS_NAME} in \
48         rs_aix*) \
49                 ${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS} ${XLIBS} -ls ;; \
50         hp_ux110) \
51                 ${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS} ${XLIBS} -lsec ;; \
52         *) ${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS} ${XLIBS} ;;\
53         esac ;
54
55 rlogind.o: rlogind.c AFS_component_version_number.c
56
57 rexecd.o: rexecd.c AFS_component_version_number.c
58
59 rexecd: rexecd.o ${ALIBS}
60         case ${SYS_NAME} in \
61         rs_aix*) \
62                 ${CC} -o $@ ${CFLAGS} rexecd.o ${ALIBS} ${XLIBS} -ls ;; \
63         *) ${CC} -o $@ ${CFLAGS} rexecd.o ${ALIBS} ${XLIBS} ;;\
64         esac ;
65
66
67 ../login/libutil.a : ../login/util_login.c ../login/util_logout.c ../login/util_logwtmp.c
68         ( cd ../login ; $(MAKE) libutil.a )
69
70 ../rsh/rcmd.o : ../rsh/rcmd.c
71         (cp AFS_component_version_number.c ../rsh/AFS_component_version_number.c ;  cd ../rsh ; $(MAKE) rsh.o )
72
73 ../rsh/herror.o : ../rsh/herror.c
74         ( cd ../rsh ; $(MAKE) herror.o )
75
76 clean:
77         rm -f ${OBJS} core rlogind AFS_component_version_number.c
78
79 cleandir: clean
80         rm -f ${MAN} tags .depend
81
82 depend: ${SRCS}
83         mkdep -p ${CFLAGS} ${SRCS}
84
85 install: ${MAN} all
86         ${INSTALL} -s -m 755 rlogind ${DESTDIR}etc/rlogind
87         ${INSTALL} -s -m 755 rexecd ${DESTDIR}etc/rexecd
88
89 lint: ${SRCS}
90         lint ${CFLAGS} ${SRCS}
91
92 tags: ${SRCS}
93         ctags ${SRCS}