cmd: 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_builddir)/src/cmd/liboafs_cmd.la \
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_builddir)/src/cmd/liboafs_cmd.la \
31          ${TOP_LIBDIR}/libuafs.a \
32          ${TOP_LIBDIR}/libafsutil.a \
33          $(top_builddir)/src/cmd/liboafs_cmd.la \
34          ${TOP_LIBDIR}/libafsutil.a \
35          $(top_builddir)/src/opr/liboafs_opr.la
36
37 FUSE_LIBS=@FUSE_LIBS@
38
39 LDFLAGS_afsd = $(AFSD_LDFLAGS)
40 afsd: afsd.o afsd_kernel.o $(AFSLIBS) $(AFSD_LIBS)
41         $(LT_LDRULE_static) afsd.o afsd_kernel.o $(NON_SHARED) \
42                 $(AFSLIBS) ${AFSD_LIBS} $(LIB_roken) $(MT_LIBS) $(XLIBS)
43
44 LDFLAGS_afsd.fuse = $(AFSD_LDFLAGS)
45 afsd.fuse: afsd_fuse.o $(UAFSLIBS) $(AFSD_LIBS)
46         $(LT_LDRULE_static) afsd_fuse.o $(NON_SHARED) \
47                 $(UAFSLIBS) $(LIB_hcrypto) $(LIB_roken) $(MT_LIBS) $(LIB_crypt) \
48                 ${XLIBS} ${FUSE_LIBS} ${AFSD_LIBS}
49
50 vsys: vsys.o
51         ${AFS_LDRULE} vsys.o ${TOP_LIBDIR}/libsys.a \
52                 $(LIB_roken) $(MT_LIBS) ${XLIBS}
53
54 #
55 # Objects
56 #
57 CFLAGS_afsd_fuse.o   = -I${TOP_SRCDIR}/afs -I${TOP_SRCDIR}/afs/UKERNEL \
58                        -I${TOP_SRCDIR}/rx/UKERNEL -DUKERNEL @FUSE_CFLAGS@
59
60 afsd.o: afsd.c AFS_component_version_number.c
61
62 afsd_fuse.o: afsd_fuse.c AFS_component_version_number.c
63         ${AFS_CCRULE} -c ${srcdir}/afsd_fuse.c
64
65 vsys.o: vsys.c AFS_component_version_number.c
66
67 clean:
68         $(RM) -f *.o vsys afsd afsd.fuse core AFS_component_version_number.c
69
70 system: install
71
72 # XXX-INST: where to put the rc scripts?
73 install: afsd vsys @ENABLE_FUSE_CLIENT@
74         ${INSTALL} -d ${DESTDIR}${sbindir}
75         ${INSTALL} afsd ${DESTDIR}${sbindir}/afsd
76         ${INSTALL} vsys ${DESTDIR}${sbindir}/vsys
77         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
78             ${INSTALL} afsd.fuse ${DESTDIR}${sbindir}/afsd.fuse; \
79         fi
80
81 dest: afsd vsys @ENABLE_FUSE_CLIENT@
82         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc
83         ${INSTALL} -d ${DEST}/etc
84         ${INSTALL} afsd ${DEST}/root.client/usr/vice/etc/afsd
85         ${INSTALL} vsys ${DEST}/etc/vsys
86         set -e; if [ -n "@ENABLE_FUSE_CLIENT@" ] ; then \
87             ${INSTALL} afsd.fuse ${DEST}/root.client/usr/vice/etc/afsd.fuse; \
88         fi
89         case ${SYS_NAME} in \
90                 rs_aix*)  \
91                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload ; \
92                         ${INSTALL_SCRIPT} ${srcdir}/rc.afs.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.afs ; \
93                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.client.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.client ; \
94                         ${INSTALL_SCRIPT} ${srcdir}/rc.dkload.server.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
95                 sgi_65 ) \
96                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
97                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
98                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
99                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi_ipnos ${DEST}/root.server/etc/init.d/afs.rc ;;\
100                 sgi_* ) \
101                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/sgiload ; \
102                         ${INSTALL} -d ${DEST}/root.server/etc/init.d ; \
103                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
104                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.sgi ${DEST}/root.server/etc/init.d/afs.rc ;\
105                         case ${SYS_NAME} in \
106                                 sgi_53 | sgi_61 ) \
107                                 ${INSTALL_SCRIPT} ${srcdir}/afs_rtsymtab.pl.${SYS_NAME} ${DEST}/root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
108                         esac;; \
109                 sun*_58 ) \
110                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
111                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.8 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
112                 sun*_59 | sun*_510 ) \
113                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
114                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.9 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
115                 sun*_511 ) \
116                         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload ; \
117                         ${INSTALL_SCRIPT} ${srcdir}/afs.rc.solaris.2.11 ${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