initial-freebsd-port-work-20010414
[openafs.git] / src / afsd / Makefile
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 # afsd makefile
9
10 SHELL = /bin/sh
11 DESTDIR = DEST/
12 SRCDIR = DEST/
13
14 SOURCES = afsd.c sys.c
15
16 COMPONENT=afsd
17 include ../config/Makefile.${SYS_NAME}
18 include ../config/Makefile.version
19
20 INSTALLro = ${INSTALL} -m 644
21 INSTALLex = ${INSTALL} -m 755
22 CFLAGS = -g -I${SRCDIR}include ${XCFLAGS}
23 LDFLAGS = -g ${XLDFLAGS}
24
25 noversion: install
26
27 #
28 # What to make
29 #
30 all:    afsd vsys
31
32 #
33 # Programs
34 #
35
36 AFSLIBS=$(SRCDIR)lib/afs/libauth.a ${SRCDIR}lib/afs/libcmd.a $(SRCDIR)lib/afs/libsys.a $(SRCDIR)lib/afs/util.a $(SRCDIR)lib/librx.a $(SRCDIR)lib/liblwp.a $(SRCDIR)lib/afs/util.a 
37
38 afsd: afsd.o $(AFSLIBS)
39         case ${SYS_NAME} in \
40         sgi_61 | sgi_62 | sgi_63) \
41                 ${CC} ${CFLAGS} -g -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib/libdwarf.a /usr/lib/libelf.a ;; \
42         sgi_64 | sgi_65 ) \
43                 ${CC} ${CFLAGS} -g -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib32/libdwarf.a /usr/lib32/libelf.a ;; \
44         * ) \
45                 ${CC} ${CFLAGS} -g -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} ;; \
46         esac
47
48 vsys: vsys.o
49         $(CC) -g -o vsys vsys.o ${SRCDIR}lib/afs/libsys.a $(LDFLAGS) ${XLIBS}
50
51 #
52 # Objects
53 #
54 afsd.o: afsd.c AFS_component_version_number.c
55
56 vsys.o: vsys.c AFS_component_version_number.c
57
58 clean:
59         rm -f *.o vsys afsd core AFS_component_version_number.c
60
61 beancount:
62         wc -l afsd.c
63
64 system: install
65
66 install: all
67         ${INSTALL} vsys ${DESTDIR}etc
68         ${INSTALL} afsd ${DESTDIR}root.client/usr/vice/etc
69         case ${SYS_NAME} in \
70                 rs_aix*)  \
71                         ${INSTALL} -f rc.afs.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.afs ; \
72                         ${INSTALL} -f rc.dkload.client.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.dkload.client ; \
73                         ${INSTALL} -f rc.dkload.server.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
74                 sgi_65 ) \
75                         ${INSTALL} -f afs.rc.sgi_ipnos ${DESTDIR}root.client/usr/vice/etc/sgiload/afs.rc ;\
76                         ${INSTALL} -f afs.rc.sgi_ipnos ${DESTDIR}root.server/etc/init.d/afs.rc ;;\
77                 sgi_* ) \
78                         ${INSTALL} -f afs.rc.sgi ${DESTDIR}root.client/usr/vice/etc/sgiload/afs.rc ;\
79                         ${INSTALL} -f afs.rc.sgi ${DESTDIR}root.server/etc/init.d/afs.rc ;\
80                         case ${SYS_NAME} in \
81                                 sgi_53 | sgi_61 ) \
82                                 ${INSTALL} -f afs_rtsymtab.pl.${SYS_NAME} ${DESTDIR}root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
83                         esac;; \
84                 sun4_52 | sun4_53 | sun4c_52 | sun4c_53 | sun4m_52 | sun4m_53 | sun4m_54 | sun4_54 | sun4c_54 | sunx86_54) \
85                         ${INSTALL} -f afs.rc.solaris ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
86                 sun4x_57 ) \
87                         ${INSTALL} -f afs.rc.solaris.2.7 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
88                 sun4x_58 ) \
89                         ${INSTALL} -f afs.rc.solaris.2.8 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
90                 sun4x_5? ) \
91                         ${INSTALL} -f afs.rc.solaris.2_5 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
92                 alpha_osf* ) \
93                         ${INSTALL} -f afs.rc.alpha ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
94                 hp_ux10? | hp_ux11? ) \
95                         ${INSTALL} -f afs.rc.hpux10 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;\
96                         ${INSTALL} -f afs.hpux102.driver ${DESTDIR}root.client/usr/vice/etc/afs.driver ;;\
97                 alpha_dux* ) \
98                         ${INSTALL} -f afs.rc.alpha_dux40 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
99                 hp?00_ux10? ) \
100                         ${INSTALL} -f afs.rc.hpux10 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
101                 *linux* ) \
102                         ${INSTALLex} -f afs.rc.linux ${DESTDIR}root.client/usr/vice/etc/afs.rc; \
103                         ${INSTALL} -f afs.conf.linux ${DESTDIR}root.client/usr/vice/etc/afs.conf ;; \
104                 ppc_darwin*) \
105                         mkdir -p ${DESTDIR}root.client/usr/vice/etc/afs.kext/Contents/MacOS ;\
106                         ${INSTALL} -f afs.ppc_darwin.plist ${DESTDIR}root.client/usr/vice/etc/afs.kext/Contents/Info.plist ; \
107                         ${INSTALLex} -f afs.rc.darwin ${DESTDIR}root.client/usr/vice/etc/afs.rc ; \
108                         ${INSTALL} -f afs.rc.darwin.plist ${DESTDIR}root.client/usr/vice/etc/StartupParameters.plist ;; \
109                 *fbsd*) \
110                         mkdir -p ${DESTDIR}root.client/usr/vice/etc/afs.rc; \
111                         ${INSTALL} -f afs.rc.fbsd ${DESTDIR}root.client/usr/vice/etc/afs.rc.fbsd ;; \
112                 * )  \
113                         echo No rc scripts installed for ${SYS_NAME} ;; \
114         esac