a7e66ab6dee8bc2aadcd26a94be6784e2fcb6ab7
[openafs.git] / src / afsd / Makefile.in
1 ##XLATE_MANUAL##
2 # Copyright 2000, International Business Machines Corporation and others.
3 # All Rights Reserved.
4
5 # This software has been released under the terms of the IBM Public
6 # License.  For details, see the LICENSE file in the top-level source
7 # directory or online at http://www.openafs.org/dl/license10.html
8
9 srcdir=@srcdir@
10 include @TOP_OBJDIR@/src/config/Makefile.config
11 include @TOP_OBJDIR@/src/config/Makefile.pthread
12
13
14 #
15 # What to make
16 #
17 all: afsd vsys @ENABLE_FUSE_CLIENT@
18
19 #
20 # Programs
21 #
22
23 AFSLIBS=${TOP_LIBDIR}/libcmd.a \
24         ${TOP_LIBDIR}/libafsauthent.a \
25         ${TOP_LIBDIR}/libsys.a \
26         ${TOP_LIBDIR}/libafsutil.a \
27         ${TOP_LIBDIR}/libafsrpc.a \
28         $(TOP_LIBDIR)/libopr.a
29
30 UAFSLIBS=${TOP_LIBDIR}/libuafs.a ${TOP_LIBDIR}/libafsutil.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libafsutil.a ${TOP_LIBDIR}/libopr.a
31
32 FUSE_LIBS=@FUSE_LIBS@
33
34 LDFLAGS_afsd = $(AFSD_LDFLAGS)
35 afsd: afsd.o afsd_kernel.o $(AFSLIBS) $(AFSD_LIBS)
36         ${AFS_LDRULE} afsd.o afsd_kernel.o $(NON_SHARED) \
37                 $(AFSLIBS) ${AFSD_LIBS} $(LIB_roken) $(MT_LIBS) $(XLIBS)
38
39 LDFLAGS_afsd.fuse = $(AFSD_LDFLAGS)
40 afsd.fuse: afsd_fuse.o $(UAFSLIBS) $(AFSD_LIBS)
41         ${AFS_LDRULE} afsd_fuse.o $(NON_SHARED) \
42                 $(UAFSLIBS) $(LIB_hcrypto) $(LIB_roken) $(MT_LIBS) $(LIB_crypt) \
43                 ${XLIBS} ${FUSE_LIBS} ${AFSD_LIBS}
44
45 vsys: vsys.o
46         ${AFS_LDRULE} vsys.o ${TOP_LIBDIR}/libsys.a \
47                 $(LIB_roken) $(MT_LIBS) ${XLIBS}
48
49 #
50 # Objects
51 #
52 CFLAGS_afsd_fuse.o   = -I${TOP_SRCDIR}/afs -I${TOP_SRCDIR}/afs/UKERNEL \
53                        -I${TOP_SRCDIR}/rx/UKERNEL -DUKERNEL @FUSE_CFLAGS@
54
55 afsd.o: afsd.c AFS_component_version_number.c
56
57 afsd_fuse.o: afsd_fuse.c AFS_component_version_number.c
58         ${AFS_CCRULE} -c ${srcdir}/afsd_fuse.c
59
60 vsys.o: vsys.c AFS_component_version_number.c
61
62 clean:
63         $(RM) -f *.o vsys afsd afsd.fuse core AFS_component_version_number.c
64
65 system: install
66
67 # XXX-INST: where to put the rc scripts?
68 install: afsd vsys @ENABLE_FUSE_CLIENT@
69         ${INSTALL} -d ${DESTDIR}${sbindir}
70         ${INSTALL} afsd ${DESTDIR}${sbindir}/afsd
71         ${INSTALL} vsys ${DESTDIR}${sbindir}/vsys
72         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
73             ${INSTALL} afsd.fuse ${DESTDIR}${sbindir}/afsd.fuse; \
74         fi
75
76 dest: afsd vsys @ENABLE_FUSE_CLIENT@
77         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc
78         ${INSTALL} -d ${DEST}/etc
79         ${INSTALL} afsd ${DEST}/root.client/usr/vice/etc/afsd
80         ${INSTALL} vsys ${DEST}/etc/vsys
81         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
82             ${INSTALL} afsd.fuse ${DEST}/root.client/usr/vice/etc/afsd.fuse; \
83         fi
84         case ${SYS_NAME} in \
85                 rs_aix*)  \
86                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
87                         ${INSTALL_SCRIPT} ${srcdir}/rc.afs.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.afs ; \
88                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.client.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.client ; \
89                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.server.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
90                 sgi_65 ) \
91                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
92                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
93                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
94                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.server/etc/init.d/afs.rc ;;\
95                 sgi_* ) \
96                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
97                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
98                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
99                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.server/etc/init.d/afs.rc ;\
100                         case ${SYS_NAME} in \
101                                 sgi_53 | sgi_61 ) \
102                                 ${INSTALL_SCRIPT} ${srcdir}/afs_rtsymtab.pl.${SYS_NAME} ${DEST}/root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
103                         esac;; \
104                 sun*_58 ) \
105                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
106                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.8 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
107                 sun*_59 | sun*_510 ) \
108                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
109                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.9 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
110                 sun*_511 ) \
111                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
112                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.11 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
113                 alpha_osf* ) \
114                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
115                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.alpha ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
116                 hp_ux1122 ) \
117                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
118                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
119                         ${INSTALL_DATA} ${srcdir}/afs.hpux1122.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
120                 hp_ux10? | hp_ux11? ) \
121                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
122                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
123                         ${INSTALL_DATA} ${srcdir}/afs.hpux102.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
124                 alpha_dux* ) \
125                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
126                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.alpha_dux40 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
127                 hp?00_ux10? ) \
128                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
129                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
130                 *linux* ) \
131                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
132                         ${INSTALL_SCRIPT} -m 755 ${srcdir}/afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \
133                         ${INSTALL_DATA} ${srcdir}/afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \
134                 *_darwin*) \
135                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
136                         ${INSTALL_SCRIPT} -m 755 ${srcdir}/afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \
137                         ${INSTALL_DATA} ${srcdir}/afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \
138                 *fbsd*) \
139                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
140                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.fbsd ${DEST}/root.client/usr/vice/etc/afs.rc.fbsd ;; \
141                 * )  \
142                         echo No rc scripts installed for ${SYS_NAME} ;; \
143         esac
144
145 include ../config/Makefile.version