861a37c5aa473c900afc0e06c36ac567c1459c78
[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.lwp
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}/libauth.a \
24         ${TOP_LIBDIR}/libcmd.a \
25         ${TOP_LIBDIR}/libsys.a \
26         ${TOP_LIBDIR}/util.a \
27         ${TOP_LIBDIR}/librx.a \
28         ${TOP_LIBDIR}/liblwp.a \
29         ${TOP_LIBDIR}/util.a \
30         $(TOP_LIBDIR)/libopr.a
31
32 UAFSLIBS=${TOP_LIBDIR}/libuafs.a ${TOP_LIBDIR}/libafsutil.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libafsutil.a ${TOP_LIBDIR}/libopr.a
33
34 FUSE_LIBS=@FUSE_LIBS@
35
36 LDFLAGS_afsd = $(AFSD_LDFLAGS)
37 afsd: afsd.o afsd_kernel.o $(AFSLIBS) $(AFSD_LIBS)
38         ${AFS_LDRULE} afsd.o afsd_kernel.o $(NON_SHARED) \
39                 $(AFSLIBS) ${AFSD_LIBS} $(LIB_roken) $(XLIBS)
40
41 LDFLAGS_afsd.fuse = $(AFSD_LDFLAGS)
42 afsd.fuse: afsd_fuse.o $(UAFSLIBS) $(AFSD_LIBS)
43         ${AFS_LDRULE} afsd_fuse.o $(NON_SHARED) \
44                 $(UAFSLIBS) $(LIB_hcrypto) $(LIB_roken) $(LIB_crypt) \
45                 ${XLIBS} ${FUSE_LIBS} ${AFSD_LIBS}
46
47 vsys: vsys.o
48         ${AFS_LDRULE} vsys.o ${TOP_LIBDIR}/libsys.a \
49                 $(LIB_roken) ${XLIBS}
50
51 #
52 # Objects
53 #
54 CFLAGS_afsd_fuse.o   = -I${TOP_SRCDIR}/afs -I${TOP_SRCDIR}/afs/UKERNEL \
55                        -I${TOP_SRCDIR}/rx/UKERNEL -DUKERNEL @FUSE_CFLAGS@
56
57 afsd.o: afsd.c AFS_component_version_number.c
58
59 afsd_fuse.o: afsd_fuse.c AFS_component_version_number.c
60         ${AFS_CCRULE} -c ${srcdir}/afsd_fuse.c
61
62 vsys.o: vsys.c AFS_component_version_number.c
63
64 clean:
65         $(RM) -f *.o vsys afsd afsd.fuse core AFS_component_version_number.c
66
67 system: install
68
69 # XXX-INST: where to put the rc scripts?
70 install: afsd vsys @ENABLE_FUSE_CLIENT@
71         ${INSTALL} -d ${DESTDIR}${sbindir}
72         ${INSTALL} afsd ${DESTDIR}${sbindir}/afsd
73         ${INSTALL} vsys ${DESTDIR}${sbindir}/vsys
74         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
75             ${INSTALL} afsd.fuse ${DESTDIR}${sbindir}/afsd.fuse; \
76         fi
77
78 dest: afsd vsys @ENABLE_FUSE_CLIENT@
79         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc
80         ${INSTALL} -d ${DEST}/etc
81         ${INSTALL} afsd ${DEST}/root.client/usr/vice/etc/afsd
82         ${INSTALL} vsys ${DEST}/etc/vsys
83         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
84             ${INSTALL} afsd.fuse ${DEST}/root.client/usr/vice/etc/afsd.fuse; \
85         fi
86         case ${SYS_NAME} in \
87                 rs_aix*)  \
88                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
89                         ${INSTALL_SCRIPT} ${srcdir}/rc.afs.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.afs ; \
90                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.client.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.client ; \
91                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.server.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
92                 sgi_65 ) \
93                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
94                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
95                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
96                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.server/etc/init.d/afs.rc ;;\
97                 sgi_* ) \
98                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
99                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
100                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
101                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.server/etc/init.d/afs.rc ;\
102                         case ${SYS_NAME} in \
103                                 sgi_53 | sgi_61 ) \
104                                 ${INSTALL_SCRIPT} ${srcdir}/afs_rtsymtab.pl.${SYS_NAME} ${DEST}/root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
105                         esac;; \
106                 sun*_58 ) \
107                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
108                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.8 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
109                 sun*_59 | sun*_510 ) \
110                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
111                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.9 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
112                 sun*_511 ) \
113                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
114                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.11 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
115                 alpha_osf* ) \
116                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
117                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.alpha ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
118                 hp_ux1122 ) \
119                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
120                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
121                         ${INSTALL_DATA} ${srcdir}/afs.hpux1122.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
122                 hp_ux10? | hp_ux11? ) \
123                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
124                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
125                         ${INSTALL_DATA} ${srcdir}/afs.hpux102.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
126                 alpha_dux* ) \
127                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
128                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.alpha_dux40 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
129                 hp?00_ux10? ) \
130                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
131                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
132                 *linux* ) \
133                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
134                         ${INSTALL_SCRIPT} -m 755 ${srcdir}/afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \
135                         ${INSTALL_DATA} ${srcdir}/afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \
136                 *_darwin*) \
137                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
138                         ${INSTALL_SCRIPT} -m 755 ${srcdir}/afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \
139                         ${INSTALL_DATA} ${srcdir}/afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \
140                 *fbsd*) \
141                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
142                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.fbsd ${DEST}/root.client/usr/vice/etc/afs.rc.fbsd ;; \
143                 * )  \
144                         echo No rc scripts installed for ${SYS_NAME} ;; \
145         esac
146
147 include ../config/Makefile.version