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