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