introduce-autoconf-for-openafs-20010628
[openafs.git] / src / afs / 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 SHELL=/bin/sh
9 KERNELDIR = ../libafs/
10 UKERNELDIR = ../libuafs/
11
12 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
13
14 COMPONENT=afs
15 include ../config/Makefile.${SYS_NAME}
16 include ../config/Makefile.version
17
18 system: install
19
20 # NOTE: linux case uses --new as well to work around bug in some versions of
21 # gencat.
22 kinstall: AFS_component_version_number.c
23         set ${KERNELDIR}afs; $(MKDIR_IF_NEEDED)
24         -chmod 666 ${KERNELDIR}afs/*
25         ${DESTDIR}bin/compile_et -v 2 afs_trace.et
26         ${INSTALL} *.[csh] ${KERNELDIR}afs
27         ${INSTALL} VNOPS/*.[csh] ${KERNELDIR}afs
28         ${INSTALL} ${AFS_OSTYPE}/*.[csh] ${KERNELDIR}afs
29         set ${DESTDIR}root.client/usr/vice/etc/C; $(MKDIR_IF_NEEDED)
30         -rm -f afszcm.cat
31         case ${SYS_NAME} in \
32                 sgi_* ) \
33                         gencat -m afszcm.cat afs_trace.msf ;; \
34                 *_linux* ) \
35                         gencat --new afszcm.cat afs_trace.msf ;; \
36                 ppc_darwin* | i386_fbsd*) \
37                         echo No gencat for ${SYS_NAME} ;; \
38                 * ) \
39                         gencat afszcm.cat afs_trace.msf ;; \
40         esac
41
42
43
44 ukinstall webinstall: AFS_component_version_number.c
45         set ${UKERNELDIR}afs; $(MKDIR_IF_NEEDED)
46         -chmod 666 ${UKERNELDIR}afs/*
47         ${DESTDIR}bin/compile_et -v 2 afs_trace.et
48         ${INSTALL} *.[csh] ${UKERNELDIR}afs
49         ${INSTALL} VNOPS/*.[csh] ${UKERNELDIR}afs
50         ${INSTALL} UKERNEL/*.[csh] ${UKERNELDIR}afs
51
52 noversion: install.noversion
53 install install.noversion: kinstall ukinstall
54         ${INSTALL} afs.h ${DESTDIR}include/afs
55         ${INSTALL} ${AFS_OSTYPE}/osi_inode.h ${DESTDIR}include/afs
56         ${INSTALL} afs_stats.h exporter.h nfsclient.h  ${DESTDIR}include/afs
57         case ${SYS_NAME} in \
58                 pmax_ul43 | pmax_ul43a) \
59                         ${INSTALL} longc_procs.h ${DESTDIR}include/afs ;; \
60         esac
61         case ${SYS_NAME} in \
62                 next_mach30 | vax_ul43 | ppc_darwin* | i386_fbsd* ) \
63                         echo skipping afszcm.cat install for ${SYS_NAME} ;; \
64                 * ) \
65                         ${INSTALL} afszcm.cat ${DESTDIR}root.client/usr/vice/etc/C ;; \
66         esac
67         case ${SYS_NAME} in \
68                 *linux* ) \
69                         ${INSTALL} ${AFS_OSTYPE}/osi_vfs.h ${DESTDIR}include/afs ;;\
70                 * ) \
71                         echo No vfs headers to install for ${SYS_NAME};; \
72         esac
73
74 clean:
75         rm -f *.o core AFS_component_version_number.c afs_trace.h afs_trace.msf afszcm.cat