6bbfe41c06ca34ae51a79355cd00a546f0729984
[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 INSTALL = @INSTALL@
12 INSTALL_DATA = @INSTALL_DATA@
13 INSTALL_PROGRAM = @INSTALL_PROGRAM@
14 INSTALL_SCRIPT = @INSTALL_SCRIPT@
15
16 LDFLAGS = ${XLDFLAGS} ${ARCHFLAGS}
17
18 #
19 # What to make
20 #
21 all: afsd vsys @ENABLE_FUSE_CLIENT@
22
23 #
24 # Programs
25 #
26
27 AFSLIBS=${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a
28 UAFSLIBS=${TOP_LIBDIR}/libuafs.a ${TOP_LIBDIR}/libdes.a ${TOP_LIBDIR}/libafsutil.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libafsutil.a
29
30 UAFS_CFLAGS=${CFLAGS} -I${TOP_SRCDIR}/afs -I${TOP_SRCDIR}/afs/UKERNEL -I${TOP_SRCDIR}/rx/UKERNEL -DUKERNEL @FUSE_CFLAGS@
31 UAFS_XLIBS=${XLIBS} @FUSE_LIBS@
32
33 afsd: afsd.o afsd_kernel.o $(AFSLIBS) $(AFSD_LIBS)
34         ${CC} ${CFLAGS} -o afsd afsd.o afsd_kernel.o $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(AFSLIBS) ${XLIBS} ${AFSD_LIBS}
35
36 afsd.fuse: afsd_fuse.o $(UAFSLIBS) $(AFSD_LIBS)
37         ${CC} ${UAFS_CFLAGS} -o afsd.fuse afsd_fuse.o $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(UAFSLIBS) ${UAFS_XLIBS} ${AFSD_LIBS}
38
39 vsys: vsys.o
40         ${CC} ${CFLAGS} -o vsys vsys.o ${TOP_LIBDIR}/libsys.a $(LDFLAGS) ${XLIBS}
41
42 #
43 # Objects
44 #
45 afsd.o: afsd.c AFS_component_version_number.c
46         $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
47
48 afsd_kernel.o: afsd_kernel.c
49         $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
50
51 afsd_fuse.o: afsd_fuse.c AFS_component_version_number.c
52         $(CC) $(UAFS_CFLAGS) -c $<
53
54 vsys.o: vsys.c AFS_component_version_number.c
55
56 clean:
57         $(RM) -f *.o vsys afsd afsd.fuse core AFS_component_version_number.c
58
59 system: install
60
61 # XXX-INST: where to put the rc scripts?
62 install: afsd vsys @ENABLE_FUSE_CLIENT@
63         ${INSTALL} -d ${DESTDIR}${sbindir}
64         ${INSTALL} afsd ${DESTDIR}${sbindir}/afsd
65         ${INSTALL} vsys ${DESTDIR}${sbindir}/vsys
66         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
67             ${INSTALL} afsd.fuse ${DESTDIR}${sbindir}/afsd.fuse; \
68         fi
69
70 dest: afsd vsys @ENABLE_FUSE_CLIENT@
71         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc
72         ${INSTALL} -d ${DEST}/etc
73         ${INSTALL} afsd ${DEST}/root.client/usr/vice/etc/afsd
74         ${INSTALL} vsys ${DEST}/etc/vsys
75         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
76             ${INSTALL} afsd.fuse ${DEST}/root.client/usr/vice/etc/afsd.fuse; \
77         fi
78         case ${SYS_NAME} in \
79                 rs_aix*)  \
80                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
81                         ${INSTALL_SCRIPT} ${srcdir}/rc.afs.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.afs ; \
82                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.client.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.client ; \
83                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.server.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
84                 sgi_65 ) \
85                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
86                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
87                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
88                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.server/etc/init.d/afs.rc ;;\
89                 sgi_* ) \
90                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
91                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
92                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
93                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.server/etc/init.d/afs.rc ;\
94                         case ${SYS_NAME} in \
95                                 sgi_53 | sgi_61 ) \
96                                 ${INSTALL_SCRIPT} ${srcdir}/afs_rtsymtab.pl.${SYS_NAME} ${DEST}/root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
97                         esac;; \
98                 sun4_52 | sun4_53 | sun4c_52 | sun4c_53 | sun4m_52 | sun4m_53 | sun4m_54 | sun4_54 | sun4c_54 | sunx86_54) \
99                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
100                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
101                 sun*_57 ) \
102                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
103                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.7 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
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                 sun4x_5? ) \
111                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
112                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2_5 ${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