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