203b5f513b9f8ae381e556f1e1f93079dcdedfb8
[openafs.git] / src / viced / Makefile
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 SHELL = /bin/sh
9 COMPONENT=viced
10 include ../config/Makefile.${SYS_NAME}
11
12 DBUG = -g
13 CFLAGS =  -DNINTERFACE ${DBUG} \
14         -I${TOP_SRCDIR}/config -I. -I${SRCDIR}include -I${SRCDIR}include/afs \
15          ${XCFLAGS} ${DBG_DEFS} -DRXDEBUG
16 LDFLAGS = ${DBUG} ${XLDFLAGS}
17
18 UTILLIB=${SRCDIR}lib/afs/util.a
19 auditlib=${SRCDIR}lib/afs/libaudit.a
20
21 LIBS=   ${SRCDIR}lib/afs/libacl.a       \
22         ${SRCDIR}lib/afs/libvldb.a      \
23         ${SRCDIR}lib/afs/libprot.a      \
24         ${SRCDIR}lib/afs/libauth.a      \
25         ${SRCDIR}lib/librxkad.a         \
26         ${SRCDIR}lib/libubik.a          \
27         ${SRCDIR}lib/afs/vlib.a         \
28         ${SRCDIR}lib/afs/libdir.a       \
29         ${UTILLIB}                      \
30         ${SRCDIR}lib/afs/libsys.a       \
31         ${SRCDIR}lib/afs/libafsint.a    \
32         ${SRCDIR}lib/librxstat.a        \
33         ${SRCDIR}lib/librx.a            \
34         ${SRCDIR}lib/afs/libsys.a       \
35         ${SRCDIR}lib/libdes.a           \
36         ${SRCDIR}lib/afs/libcom_err.a   \
37         ${SRCDIR}lib/afs/util.a         \
38         ${SRCDIR}lib/liblwp.a 
39
40 headers=${SRCDIR}include/lwp.h          \
41         ${SRCDIR}include/afs/acl.h      \
42         ${SRCDIR}include/afs/errors.h   \
43         ${SRCDIR}include/afs/ptclient.h \
44         ${SRCDIR}include/lock.h         \
45         ${SRCDIR}include/afs/volume.h   \
46         ${SRCDIR}include/afs/vnode.h    \
47         ${SRCDIR}include/rx/rx.h        \
48         ${SRCDIR}include/rx/xdr.h       \
49         ${SRCDIR}include/afs/auth.h     \
50         ${SRCDIR}include/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 include ../config/Makefile.version
62
63 noversion: install
64
65 all: cbd fsprobe check_sysid
66
67 ${objects}:${headers}
68 viced.o: AFS_component_version_number.o
69
70 check_sysid: check_sysid.c
71         ${CC} ${CFLAGS} -IDEST/include -o check_sysid check_sysid.c
72
73 fileserver: viced.o ${objects} ${headers} ${LIBS}
74         set -x; \
75         case ${SYS_NAME} in \
76         *linux*) \
77             ${CC} ${LDFLAGS} -o fileserver ${objects} \
78             ${auditlib} ${LIBS} ${XLIBS} ;; \
79         rs_aix*) \
80             ${CC} -K ${LDFLAGS} -o fileserver ${objects} \
81             ${auditlib} ${LIBS} ${XLIBS} ;; \
82         *) \
83             ${CC} ${LDFLAGS} -o fileserver ${objects} \
84             ${auditlib} ${LIBS} ${XLIBS} ;; \
85         esac
86
87 fsprobe.o: fsprobe.c  AFS_component_version_number.c
88         ${CC} ${CFLAGS} -DINTERPRET_DUMP -c fsprobe.c
89
90 fsprobe: fsprobe.o
91         ${CC} ${CFLAGS} -o fsprobe fsprobe.o ${LIBS} ${XLIBS}  
92
93 cbd.o: callback.c AFS_component_version_number.c
94         ${CC} ${CFLAGS} -DINTERPRET_DUMP -c -o cbd.o callback.c
95
96 cbd: cbd.o
97         ${CC} ${CFLAGS} -DINTERPRET_DUMP -o cbd cbd.o ${LIBS} ${XLIBS}  
98
99 lint:
100         lint -uvn  -I${SRCDIR}include viced.c afsfileprocs.c host.c physio.c callback.c ${SRCDIR}lib/afs/llib-lutil.ln
101
102 ${DESTDIR}root.server/usr/afs/bin/fileserver : fileserver
103         @case ${SYS_NAME} in \
104         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*) \
105         echo "Don't install fileserver for ${SYS_NAME}" ;; \
106         *) \
107         echo ${INSTALL} -ns fileserver ${DESTDIR}root.server/usr/afs/bin/fileserver ; \
108         ${INSTALL} -ns fileserver ${DESTDIR}root.server/usr/afs/bin/fileserver ;; \
109         esac
110
111 install: all  ${DESTDIR}root.server/usr/afs/bin/fileserver
112         ${INSTALL} fs_stats.h ${DESTDIR}/include/afs
113
114 system: install
115
116 clean:
117         rm -f *.o llib-lvice.ln fileserver core AFS_component_version_number.c cbd check_sysid fsprobe
118
119 beancount:
120         wc -l *.c *.h