7511cfac4a07d0eafdd26d2d447dd33baa2beb4a
[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} -c ${CPPFLAGS} ${UAFS_CFLAGS} afsd_fuse.c -o afsd_fuse.o
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
63         ${INSTALL} -d ${DESTDIR}${sbindir}
64         ${INSTALL} afsd ${DESTDIR}${sbindir}/afsd
65         ${INSTALL} vsys ${DESTDIR}${sbindir}/vsys
66
67 dest: afsd vsys
68         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc
69         ${INSTALL} -d ${DEST}/etc
70         ${INSTALL} afsd ${DEST}/root.client/usr/vice/etc/afsd
71         ${INSTALL} vsys ${DEST}/etc/vsys
72         case ${SYS_NAME} in \
73                 rs_aix*)  \
74                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
75                         ${INSTALL_SCRIPT} ${srcdir}/rc.afs.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.afs ; \
76                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.client.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.client ; \
77                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.server.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
78                 sgi_65 ) \
79                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
80                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
81                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
82                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.server/etc/init.d/afs.rc ;;\
83                 sgi_* ) \
84                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
85                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
86                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
87                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.server/etc/init.d/afs.rc ;\
88                         case ${SYS_NAME} in \
89                                 sgi_53 | sgi_61 ) \
90                                 ${INSTALL_SCRIPT} ${srcdir}/afs_rtsymtab.pl.${SYS_NAME} ${DEST}/root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
91                         esac;; \
92                 sun4_52 | sun4_53 | sun4c_52 | sun4c_53 | sun4m_52 | sun4m_53 | sun4m_54 | sun4_54 | sun4c_54 | sunx86_54) \
93                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
94                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
95                 sun*_57 ) \
96                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
97                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.7 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
98                 sun*_58 ) \
99                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
100                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.8 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
101                 sun*_59 | sun*_510 ) \
102                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
103                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.9 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
104                 sun4x_5? ) \
105                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
106                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2_5 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
107                 alpha_osf* ) \
108                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
109                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.alpha ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
110                 hp_ux1122 ) \
111                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
112                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
113                         ${INSTALL_DATA} ${srcdir}/afs.hpux1122.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
114                 hp_ux10? | hp_ux11? ) \
115                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
116                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
117                         ${INSTALL_DATA} ${srcdir}/afs.hpux102.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
118                 alpha_dux* ) \
119                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
120                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.alpha_dux40 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
121                 hp?00_ux10? ) \
122                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
123                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
124                 *linux* ) \
125                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
126                         ${INSTALL_SCRIPT} -m 755 ${srcdir}/afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \
127                         ${INSTALL_DATA} ${srcdir}/afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \
128                 *_darwin*) \
129                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
130                         ${INSTALL_SCRIPT} -m 755 ${srcdir}/afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \
131                         ${INSTALL_DATA} ${srcdir}/afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \
132                 *fbsd*) \
133                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc ; \
134                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.fbsd ${DEST}/root.client/usr/vice/etc/afs.rc.fbsd ;; \
135                 * )  \
136                         echo No rc scripts installed for ${SYS_NAME} ;; \
137         esac
138
139 include ../config/Makefile.version