cc5b65b9871dfb80aee9644676c80400119033c1
[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 # afsd makefile
10 DEST=@DEST@
11 TOP_INCDIR=@TOP_INCDIR@
12 TOP_LIBDIR=@TOP_LIBDIR@
13 prefix=@prefix@
14 exec_prefix=@exec_prefix@
15 bindir=@bindir@
16 sbindir=@sbindir@
17 libexecdir=@libexecdir@
18 libdir=@libdir@
19 includedir=@includedir@
20 mandir=@mandir@
21 afssrvbindir=@afssrvbindir@
22 afssrvsbindir=@afssrvsbindir@
23 afssrvlibexecdir=@afssrvlibexecdir@
24 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
25 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
26 TOP_SRCDIR=@TOP_SRCDIR@
27 SYS_NAME=@AFS_SYSNAME@
28
29 SHELL = /bin/sh
30
31 include ../config/Makefile.${SYS_NAME}
32
33 CFLAGS=-g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
34 LDFLAGS = -g ${XLDFLAGS}
35
36 INSTALLex = ${INSTALL} -m 755
37
38 #
39 # What to make
40 #
41 all: afsd vsys
42
43 #
44 # Programs
45 #
46
47 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
48
49 afsd: afsd.o $(AFSLIBS)
50         case ${SYS_NAME} in \
51         sgi_61 | sgi_62 | sgi_63) \
52                 ${CC} ${CFLAGS} -g -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib/libdwarf.a /usr/lib/libelf.a ;; \
53         sgi_64 | sgi_65 ) \
54                 ${CC} ${CFLAGS} -g -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib32/libdwarf.a /usr/lib32/libelf.a ;; \
55         * ) \
56                 ${CC} ${CFLAGS} -g -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} ;; \
57         esac
58
59 vsys: vsys.o
60         $(CC) -g -o vsys vsys.o ${TOP_LIBDIR}/libsys.a $(LDFLAGS) ${XLIBS}
61
62 #
63 # Objects
64 #
65 afsd.o: afsd.c AFS_component_version_number.c
66
67 vsys.o: vsys.c AFS_component_version_number.c
68
69 clean:
70         $(RM) -f *.o vsys afsd core AFS_component_version_number.c
71
72 system: install
73
74 # XXX-INST: where to put the rc scripts?
75 install: ${DESTDIR}${sbindir}/afsd ${DESTDIR}${sbindir}/vsys
76
77 ${DESTDIR}${sbindir}/afsd: afsd
78         ${INSTALL} $? $@
79
80 ${DESTDIR}${sbindir}/vsys: vsys
81         ${INSTALL} $? $@
82
83
84 dest: ${DEST}/root.client/usr/vice/etc/afsd ${DEST}/etc/vsys
85         case ${SYS_NAME} in \
86                 rs_aix*)  \
87                         ${INSTALL} -f rc.afs.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.afs ; \
88                         ${INSTALL} -f rc.dkload.client.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.client ; \
89                         ${INSTALL} -f rc.dkload.server.rs_aix ${DEST}/root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
90                 sgi_65 ) \
91                         ${INSTALL} -f afs.rc.sgi_ipnos ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
92                         ${INSTALL} -f afs.rc.sgi_ipnos ${DEST}/root.server/etc/init.d/afs.rc ;;\
93                 sgi_* ) \
94                         ${INSTALL} -f afs.rc.sgi ${DEST}/root.client/usr/vice/etc/sgiload/afs.rc ;\
95                         ${INSTALL} -f afs.rc.sgi ${DEST}/root.server/etc/init.d/afs.rc ;\
96                         case ${SYS_NAME} in \
97                                 sgi_53 | sgi_61 ) \
98                                 ${INSTALL} -f 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} -f afs.rc.solaris ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
102                 sun4x_57 ) \
103                         ${INSTALL} -f afs.rc.solaris.2.7 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
104                 sun4x_58 ) \
105                         ${INSTALL} -f afs.rc.solaris.2.8 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
106                 sun4x_5? ) \
107                         ${INSTALL} -f afs.rc.solaris.2_5 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\
108                 alpha_osf* ) \
109                         ${INSTALL} -f afs.rc.alpha ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
110                 hp_ux10? | hp_ux11? ) \
111                         ${INSTALL} -f afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\
112                         ${INSTALL} -f afs.hpux102.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\
113                 alpha_dux* ) \
114                         ${INSTALL} -f afs.rc.alpha_dux40 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
115                 hp?00_ux10? ) \
116                         ${INSTALL} -f afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\
117                 *linux* ) \
118                         ${INSTALLex} -f afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \
119                         ${INSTALL} -f afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \
120                 ppc_darwin*) \
121                         ${INSTALLex} -f afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \
122                         ${INSTALL} -f afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \
123                 *fbsd*) \
124                         ${INSTALL} -f afs.rc.fbsd ${DEST}/root.client/usr/vice/etc/afs.rc.fbsd ;; \
125                 * )  \
126                         echo No rc scripts installed for ${SYS_NAME} ;; \
127         esac
128
129 ${DEST}/root.client/usr/vice/etc/afsd: afsd
130         ${INSTALL} $? $@
131
132 ${DEST}/etc/vsys: vsys
133         ${INSTALL} $? $@
134
135 include ../config/Makefile.version