darwin-x86-and-leopard-20060309
[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 HELPER_SPLINT=@HELPER_SPLINT@
13
14
15 CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} \
16         -I${TOP_INCDIR}/afs -I${TOP_OBJDIR} -I${TOP_OBJDIR}/fsint\
17          ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG -DNINTERFACE
18
19 LDFLAGS = ${DBUG} ${XLDFLAGS} ${ARCHFLAGS}
20
21 LIBS=${TOP_LIBDIR}/libacl.a     \
22         ${TOP_LIBDIR}/libvldb.a \
23         ${TOP_LIBDIR}/libprot.a \
24         ${TOP_LIBDIR}/libauth.a \
25         ${TOP_LIBDIR}/librxkad.a                \
26         ${TOP_LIBDIR}/libubik.a                 \
27         ${TOP_LIBDIR}/vlib.a            \
28         ${TOP_LIBDIR}/libdir.a  \
29         ${TOP_LIBDIR}/util.a            \
30         ${TOP_LIBDIR}/libsys.a  \
31         ${TOP_LIBDIR}/libafsint.a       \
32         ${TOP_LIBDIR}/librxstat.a       \
33         ${TOP_LIBDIR}/librx.a           \
34         ${TOP_LIBDIR}/libsys.a  \
35         ${TOP_LIBDIR}/libdes.a          \
36         ${TOP_LIBDIR}/libcom_err.a      \
37         ${TOP_LIBDIR}/liblwp.a \
38         ${TOP_LIBDIR}/libafsutil.a
39
40 headers=${TOP_INCDIR}/lwp.h             \
41         ${TOP_INCDIR}/afs/acl.h \
42         ${TOP_INCDIR}/afs/errors.h      \
43         ${TOP_INCDIR}/afs/ptclient.h \
44         ${TOP_INCDIR}/lock.h            \
45         ${TOP_INCDIR}/afs/volume.h      \
46         ${TOP_INCDIR}/afs/vnode.h       \
47         ${TOP_INCDIR}/rx/rx.h   \
48         ${TOP_INCDIR}/rx/xdr.h  \
49         ${TOP_INCDIR}/afs/auth.h        \
50         ${TOP_INCDIR}/afs/afsint.h      \
51         viced.h                         \
52         host.h                          \
53         fs_stats.h
54
55 objects=viced.o         \
56         afsfileprocs.o  \
57         host.o          \
58         physio.o        \
59         callback.o      
60
61 all: cbd fsprobe check_sysid fileserver ${TOP_INCDIR}/afs/fs_stats.h
62
63 ${objects}: ${headers}
64
65 viced.o: AFS_component_version_number.o
66
67 check_sysid: check_sysid.c
68         ${CC} ${CFLAGS} -o check_sysid ${srcdir}/check_sysid.c
69
70 fileserver: ${objects} ${headers} ${LIBS}
71         set -x; \
72         case ${SYS_NAME} in \
73         rs_aix*) \
74             ${CC} -K ${LDFLAGS} -o fileserver ${objects} \
75             ${TOP_LIBDIR}/libaudit.a ${LIBS} ${XLIBS} ;; \
76         *) \
77             ${CC} ${LDFLAGS} -o fileserver ${objects} \
78             ${TOP_LIBDIR}/libaudit.a ${LIBS} ${XLIBS} ;; \
79         esac
80
81 fsprobe.o: fsprobe.c AFS_component_version_number.c
82         ${CC} ${CFLAGS} -DINTERPRET_DUMP -c ${srcdir}/fsprobe.c
83
84 fsprobe: fsprobe.o
85         ${CC} ${CFLAGS} -o fsprobe fsprobe.o ${LIBS} ${XLIBS} 
86
87 cbd.o: callback.c AFS_component_version_number.c
88         ${CC} ${CFLAGS} -DINTERPRET_DUMP -c -o cbd.o ${srcdir}/callback.c
89
90 cbd: cbd.o
91         ${CC} ${CFLAGS} -DINTERPRET_DUMP -o cbd cbd.o ${LIBS} ${XLIBS} 
92
93 ${DEST}/root.server/usr/afs/bin/fileserver: fileserver
94         @case ${SYS_NAME} in \
95         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
96         echo "Don't install fileserver for ${SYS_NAME}" ;; \
97         *_darwin_[1-6][0-9]) \
98         echo ${INSTALL} -ns $? $@ ; \
99         ${INSTALL} -ns $? $@ ;; \
100         *_darwin_*) \
101         echo "Don't install fileserver for ${SYS_NAME}" ;; \
102         *) \
103         echo ${INSTALL} -ns $? $@ ; \
104         ${INSTALL} -ns $? $@ ;; \
105         esac
106
107 ${DEST}/include/afs/fs_stats.h: fs_stats.h
108         ${INSTALL} $? $@
109
110 install:    ${DESTDIR}${afssrvlibexecdir}/fileserver ${DESTDIR}${includedir}/afs/fs_stats.h
111
112 clean:
113         $(RM) -f *.o fileserver core AFS_component_version_number.c cbd check_sysid fsprobe
114
115 include ../config/Makefile.version
116 ${DESTDIR}${afssrvlibexecdir}/fileserver: fileserver
117         @case ${SYS_NAME} in \
118         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
119         echo "Don't install fileserver for ${SYS_NAME}" ;; \
120         *_darwin_[1-6][0-9]) \
121         echo ${INSTALL} -ns $? $@ ; \
122         ${INSTALL} -ns $? $@ ;; \
123         *_darwin_*) \
124         echo "Don't install fileserver for ${SYS_NAME}" ;; \
125         *) \
126         echo ${INSTALL} -ns $? $@ ; \
127         ${INSTALL} -ns $? $@ ;; \
128         esac
129
130 ${DESTDIR}${includedir}/afs/fs_stats.h: fs_stats.h
131         ${INSTALL} $? $@
132
133 ${TOP_INCDIR}/afs/fs_stats.h: fs_stats.h
134         ${INSTALL} $? $@
135
136 dest:    ${DEST}/root.server/usr/afs/bin/fileserver ${DEST}/include/afs/fs_stats.h
137
138 check-splint::
139         sh $(HELPER_SPLINT) $(CFLAGS) \
140             viced.c             \
141             afsfileprocs.c      \
142             host.c              \
143             physio.c    \
144             callback.c