viced: Use libcmd for command line options
[openafs.git] / src / viced / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7 #
8 # Portions Copyright (c) 2003 Apple Computer, Inc.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12 include @TOP_OBJDIR@/src/config/Makefile.lwp
13 HELPER_SPLINT=@HELPER_SPLINT@
14
15 LIBS=${TOP_LIBDIR}/libacl.a     \
16         ${TOP_LIBDIR}/libvldb.a \
17         ${TOP_LIBDIR}/libprot.a \
18         ${TOP_LIBDIR}/libauth.a \
19         ${TOP_LIBDIR}/librxkad.a                \
20         ${TOP_LIBDIR}/libubik.a                 \
21         ${TOP_LIBDIR}/vlib.a            \
22         ${TOP_LIBDIR}/libdir.a  \
23         ${TOP_LIBDIR}/util.a            \
24         ${TOP_LIBDIR}/libsys.a  \
25         ${TOP_LIBDIR}/libafsint.a       \
26         ${TOP_LIBDIR}/librxstat.a       \
27         ${TOP_LIBDIR}/librx.a           \
28         ${TOP_LIBDIR}/libsys.a  \
29         ${TOP_LIBDIR}/libafscom_err.a   \
30         ${TOP_LIBDIR}/libcmd.a          \
31         ${TOP_LIBDIR}/liblwp.a \
32         ${TOP_LIBDIR}/libafsutil.a \
33         $(TOP_LIBDIR)/libopr.a \
34         ${TOP_LIBDIR}/libafshcrypto_lwp.a
35
36 headers=${TOP_INCDIR}/lwp.h             \
37         ${TOP_INCDIR}/afs/acl.h \
38         ${TOP_INCDIR}/afs/errors.h      \
39         ${TOP_INCDIR}/afs/ptclient.h \
40         ${TOP_INCDIR}/lock.h            \
41         ${TOP_INCDIR}/afs/volume.h      \
42         ${TOP_INCDIR}/afs/vnode.h       \
43         ${TOP_INCDIR}/rx/rx.h   \
44         ${TOP_INCDIR}/rx/xdr.h  \
45         ${TOP_INCDIR}/afs/auth.h        \
46         ${TOP_INCDIR}/afs/afsint.h      \
47         viced.h                         \
48         host.h                          \
49         callback.h                      \
50         fs_stats.h
51
52 objects=viced.o         \
53         afsfileprocs.o  \
54         host.o          \
55         physio.o        \
56         callback.o      \
57         fsstats.o
58
59 all: cbd fsprobe check_sysid fileserver ${TOP_INCDIR}/afs/fs_stats.h
60
61 ${TOP_INCDIR}/afs/fs_stats.h: fs_stats.h
62         ${INSTALL_DATA} $? $@
63
64 ${objects}: ${headers}
65
66 viced.o: AFS_component_version_number.o
67
68 check_sysid: check_sysid.c
69         ${CC} ${AFS_CFLAGS} ${AFS_LDFLAGS} -o check_sysid \
70                 ${srcdir}/check_sysid.c
71
72 fileserver: ${objects} ${headers} ${LIBS}
73         set -x; \
74         case ${SYS_NAME} in \
75         rs_aix*) \
76             ${CC} -K ${AFS_LDFLAGS} -o fileserver ${objects} \
77                 ${TOP_LIBDIR}/libaudit.a ${LIBS} $(LIB_roken) ${XLIBS} ;; \
78         *) \
79             $(AFS_LDRULE) ${objects} ${TOP_LIBDIR}/libaudit.a \
80                 ${LIBS} $(LIB_roken) ${XLIBS} ;; \
81         esac
82
83 fsprobe.o: fsprobe.c AFS_component_version_number.c
84
85 fsprobe: fsprobe.o
86         $(AFS_LDRULE) fsprobe.o ${LIBS} $(LIB_roken) ${XLIBS}
87
88 CFLAGS_cbd.o = -DINTERPRET_DUMP
89 cbd.o: callback.c AFS_component_version_number.c
90         $(AFS_CCRULE) $(srcdir)/callback.c
91
92 cbd: cbd.o
93         $(AFS_LDRULE) cbd.o ${LIBS} $(LIB_roken) ${XLIBS}
94
95 install: fileserver fs_stats.h
96         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
97         ${INSTALL} -d ${DESTDIR}${includedir}/afs
98         ${INSTALL_DATA} ${srcdir}/fs_stats.h ${DESTDIR}${includedir}/afs/fs_stats.h
99         @case ${SYS_NAME} in \
100         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
101                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
102         *_darwin_[1-6][0-9]) \
103                 echo ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \
104                 ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \
105         *_darwin_*) \
106                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
107         *) \
108                 echo ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \
109                 ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \
110         esac
111
112 dest: fileserver fs_stats.h
113         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
114         ${INSTALL} -d ${DEST}/include/afs
115         ${INSTALL_DATA} ${srcdir}/fs_stats.h ${DEST}/include/afs/fs_stats.h
116         @case ${SYS_NAME} in \
117         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
118                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
119         *_darwin_[1-6][0-9]) \
120                 echo ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \
121                 ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \
122         *_darwin_*) \
123                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
124         *) \
125                 echo ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \
126                 ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \
127         esac
128
129 clean:
130         $(RM) -f *.o fileserver core AFS_component_version_number.c cbd check_sysid fsprobe
131
132 include ../config/Makefile.version
133 check-splint::
134         sh $(HELPER_SPLINT) $(CFLAGS) \
135             viced.c             \
136             afsfileprocs.c      \
137             host.c              \
138             physio.c    \
139             callback.c
140