a8a4148c1d3fec925e01c26fa44d4b4df153b9c3
[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}/liblwp.a \
31         ${TOP_LIBDIR}/libafsutil.a \
32         $(TOP_LIBDIR)/libopr.a \
33         ${TOP_LIBDIR}/libafshcrypto_lwp.a
34
35 headers=${TOP_INCDIR}/lwp.h             \
36         ${TOP_INCDIR}/afs/acl.h \
37         ${TOP_INCDIR}/afs/errors.h      \
38         ${TOP_INCDIR}/afs/ptclient.h \
39         ${TOP_INCDIR}/lock.h            \
40         ${TOP_INCDIR}/afs/volume.h      \
41         ${TOP_INCDIR}/afs/vnode.h       \
42         ${TOP_INCDIR}/rx/rx.h   \
43         ${TOP_INCDIR}/rx/xdr.h  \
44         ${TOP_INCDIR}/afs/auth.h        \
45         ${TOP_INCDIR}/afs/afsint.h      \
46         viced.h                         \
47         host.h                          \
48         callback.h                      \
49         fs_stats.h
50
51 objects=viced.o         \
52         afsfileprocs.o  \
53         host.o          \
54         physio.o        \
55         callback.o      \
56         fsstats.o
57
58 all: cbd fsprobe check_sysid fileserver ${TOP_INCDIR}/afs/fs_stats.h
59
60 ${TOP_INCDIR}/afs/fs_stats.h: fs_stats.h
61         ${INSTALL_DATA} $? $@
62
63 ${objects}: ${headers}
64
65 viced.o: AFS_component_version_number.o
66
67 check_sysid: check_sysid.c
68         ${CC} ${AFS_CFLAGS} ${AFS_LDFLAGS} -o check_sysid \
69                 ${srcdir}/check_sysid.c
70
71 fileserver: ${objects} ${headers} ${LIBS}
72         set -x; \
73         case ${SYS_NAME} in \
74         rs_aix*) \
75             ${CC} -K ${AFS_LDFLAGS} -o fileserver ${objects} \
76                 ${TOP_LIBDIR}/libaudit.a ${LIBS} $(LIB_roken) ${XLIBS} ;; \
77         *) \
78             $(AFS_LDRULE) ${objects} ${TOP_LIBDIR}/libaudit.a \
79                 ${LIBS} $(LIB_roken) ${XLIBS} ;; \
80         esac
81
82 fsprobe.o: fsprobe.c AFS_component_version_number.c
83
84 fsprobe: fsprobe.o
85         $(AFS_LDRULE) fsprobe.o ${LIBS} $(LIB_roken) ${XLIBS}
86
87 CFLAGS_cbd.o = -DINTERPRET_DUMP
88 cbd.o: callback.c AFS_component_version_number.c
89         $(AFS_CCRULE) $(srcdir)/callback.c
90
91 cbd: cbd.o
92         $(AFS_LDRULE) cbd.o ${LIBS} $(LIB_roken) ${XLIBS}
93
94 install: fileserver fs_stats.h
95         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
96         ${INSTALL} -d ${DESTDIR}${includedir}/afs
97         ${INSTALL_DATA} ${srcdir}/fs_stats.h ${DESTDIR}${includedir}/afs/fs_stats.h
98         @case ${SYS_NAME} in \
99         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
100                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
101         *_darwin_[1-6][0-9]) \
102                 echo ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \
103                 ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \
104         *_darwin_*) \
105                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
106         *) \
107                 echo ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \
108                 ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \
109         esac
110
111 dest: fileserver fs_stats.h
112         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
113         ${INSTALL} -d ${DEST}/include/afs
114         ${INSTALL_DATA} ${srcdir}/fs_stats.h ${DEST}/include/afs/fs_stats.h
115         @case ${SYS_NAME} in \
116         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
117                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
118         *_darwin_[1-6][0-9]) \
119                 echo ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \
120                 ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \
121         *_darwin_*) \
122                 echo "Don't install fileserver for ${SYS_NAME}" ;; \
123         *) \
124                 echo ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \
125                 ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \
126         esac
127
128 clean:
129         $(RM) -f *.o fileserver core AFS_component_version_number.c cbd check_sysid fsprobe
130
131 include ../config/Makefile.version
132 check-splint::
133         sh $(HELPER_SPLINT) $(CFLAGS) \
134             viced.c             \
135             afsfileprocs.c      \
136             host.c              \
137             physio.c    \
138             callback.c
139