undo-makefiles-rewrite-for-objdir-support-20011023
[openafs.git] / src / afs / Makefile.in
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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 TOP_OBJDIR=@TOP_OBJDIR@
12 srcdir=@srcdir@
13 VPATH=${srcdir}
14 prefix=@prefix@
15 exec_prefix=@exec_prefix@
16 bindir=@bindir@
17 sbindir=@sbindir@
18 libexecdir=@libexecdir@
19 libdir=@libdir@
20 includedir=@includedir@
21 mandir=@mandir@
22 afssrvbindir=@afssrvbindir@
23 afssrvsbindir=@afssrvsbindir@
24 afssrvlibexecdir=@afssrvlibexecdir@
25 COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
26 RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
27 TOP_SRCDIR=@TOP_SRCDIR@
28 SYS_NAME=@AFS_SYSNAME@
29
30 SHELL=/bin/sh
31 KERNELDIR = ../libafs
32 UKERNELDIR = ../libuafs
33
34 include ../config/Makefile.${SYS_NAME}
35
36 all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h
37         case ${SYS_NAME} in \
38                 pmax_ul43 | pmax_ul43a) \
39                         ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
40         esac
41
42 # NOTE: linux case uses --new as well to work around bug in some versions of
43 # gencat.
44 kinstall: ${KERNELDIR}/afs AFS_component_version_number.c afszcm.cat
45         -chmod 666 ${KERNELDIR}/afs/*
46         ${INSTALL} ${srcdir}/*.[csh] ${KERNELDIR}/afs
47         -${INSTALL} *.[csh] ${KERNELDIR}/afs
48         ${INSTALL} ${srcdir}/VNOPS/*.[csh] ${KERNELDIR}/afs
49         ${INSTALL} ${srcdir}/${AFS_OSTYPE}/*.[csh] ${KERNELDIR}/afs
50         -${INSTALL} ${AFS_OSTYPE}/*.[csh] ${KERNELDIR}/afs
51
52 afs_trace.h afs_trace.msf:
53         ${COMPILE_ET} -v 2 -p ${srcdir} afs_trace.et
54
55 afszcm.cat: afs_trace.msf
56         -$(RM) -f afszcm.cat
57         case ${SYS_NAME} in \
58                 sgi_* ) \
59                         gencat -m afszcm.cat afs_trace.msf ;; \
60                 *_linux* ) \
61                         gencat --new afszcm.cat afs_trace.msf ;; \
62                 ppc_darwin* | i386_fbsd*) \
63                         echo No gencat for ${SYS_NAME} ;; \
64                 * ) \
65                         gencat afszcm.cat afs_trace.msf ;; \
66         esac
67
68 ${KERNELDIR}/afs:
69         mkdir -p $@
70
71 ukinstall: ${UKERNELDIR}/afs afs_trace.msf AFS_component_version_number.c
72         -chmod 666 ${UKERNELDIR}/afs/*
73         ${INSTALL} *.[csh] ${UKERNELDIR}/afs
74         ${INSTALL} ${srcdir}/*.[csh] ${UKERNELDIR}/afs
75         ${INSTALL} ${srcdir}/VNOPS/*.[csh] ${UKERNELDIR}/afs
76         ${INSTALL} ${srcdir}/UKERNEL/*.[csh] ${UKERNELDIR}/afs
77
78 ${UKERNELDIR}/afs:
79         mkdir -p $@
80
81 install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h
82         case ${SYS_NAME} in \
83                 pmax_ul43 | pmax_ul43a) \
84                         ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \
85         esac
86         case ${SYS_NAME} in \
87                 *linux* ) \
88                         ${INSTALL} ${AFS_OSTYPE}/osi_vfs.h ${DESTDIR}${includedir}/afs ;;\
89                 * ) \
90                         echo No vfs headers to install for ${SYS_NAME};; \
91         esac
92
93 clean:
94         -$(RM) -f *.o core AFS_component_version_number.c afs_trace.h afs_trace.msf afszcm.cat
95
96 include ../config/Makefile.version
97 ${DEST}/include/afs/afs.h: afs.h
98         ${INSTALL} $? $@
99
100 ${DESTDIR}${includedir}/afs/afs.h: afs.h
101         ${INSTALL} $? $@
102
103
104 ${TOP_INCDIR}/afs/afs.h: afs.h
105         ${INSTALL} $? $@
106
107
108 ${DEST}/include/afs/osi_inode.h: ${AFS_OSTYPE}/osi_inode.h
109         ${INSTALL} $? $@
110
111 ${DESTDIR}${includedir}/afs/osi_inode.h: ${AFS_OSTYPE}/osi_inode.h
112         ${INSTALL} $? $@
113
114 ${TOP_INCDIR}/afs/osi_inode.h: ${AFS_OSTYPE}/osi_inode.h
115         ${INSTALL} $? $@
116
117
118 ${DEST}/include/afs/afs_stats.h: afs_stats.h
119         ${INSTALL} $? $@
120
121 ${DESTDIR}${includedir}/afs/afs_stats.h: afs_stats.h
122         ${INSTALL} $? $@
123
124
125 ${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h
126         ${INSTALL} $? $@
127
128
129 ${DEST}/include/afs/exporter.h: exporter.h
130         ${INSTALL} $? $@
131
132 ${DESTDIR}${includedir}/afs/exporter.h: exporter.h
133         ${INSTALL} $? $@
134
135
136 ${TOP_INCDIR}/afs/exporter.h: exporter.h
137         ${INSTALL} $? $@
138
139
140 ${DEST}/include/afs/nfsclient.h: nfsclient.h
141         ${INSTALL} $? $@
142
143 ${DESTDIR}${includedir}/afs/nfsclient.h: nfsclient.h
144         ${INSTALL} $? $@
145
146
147 ${TOP_INCDIR}/afs/nfsclient.h: nfsclient.h
148         ${INSTALL} $? $@
149
150
151 dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h
152         case ${SYS_NAME} in \
153                 pmax_ul43 | pmax_ul43a) \
154                         ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \
155         esac
156         case ${SYS_NAME} in \
157                 next_mach30 | vax_ul43 | ppc_darwin* | i386_fbsd* ) \
158                         echo skipping afszcm.cat install for ${SYS_NAME} ;; \
159                 * ) \
160                         ${INSTALL} afszcm.cat ${DEST}/root.client/usr/vice/etc/C ;; \
161         esac
162         case ${SYS_NAME} in \
163                 *linux* ) \
164                         ${INSTALL} ${AFS_OSTYPE}/osi_vfs.h ${DEST}/include/afs ;;\
165                 * ) \
166                         echo No vfs headers to install for ${SYS_NAME};; \
167         esac
168