7dbb9f4f2ae9051a029b22b987a131a8fe29aed5
[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 # Portions Copyright (c) 2003 Apple Computer, Inc.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12 include @TOP_OBJDIR@/src/config/Makefile.lwp
13
14
15 all: depinstall
16
17 generated: afs_trace.h afs_trace.msf unified_afs.c unified_afs.h
18
19 afs_trace.h afs_trace.msf: afs_trace.et
20         ${COMPILE_ET} -v 2 -p ${srcdir} afs_trace.et
21
22 unified_afs.c unified_afs.h: unified_afs.et
23         $(RM) -f unified_afs.c unified_afs.h
24         ${COMPILE_ET} -p ${srcdir} unified_afs -h unified_afs
25
26 afszcm.cat: afs_trace.msf
27         -$(RM) -f afszcm.cat
28         case ${SYS_NAME} in \
29                 sgi_* ) \
30                         ${GENCAT} -m afszcm.cat afs_trace.msf ;; \
31                 *_linux* | *_umlinux* ) \
32                         ${GENCAT} --new afszcm.cat afs_trace.msf ;; \
33                 *_darwin_* ) \
34                         ${GENCAT} -new afszcm.cat afs_trace.msf ;; \
35                 * ) \
36                         ${GENCAT} afszcm.cat afs_trace.msf ;; \
37         esac
38
39 depinstall: afszcm.cat AFS_component_version_number.c \
40         ${TOP_INCDIR}/afs/afs_consts.h \
41         ${TOP_INCDIR}/afs/afs.h \
42         ${TOP_INCDIR}/afs/osi_inode.h \
43         ${TOP_INCDIR}/afs/afs_stats.h \
44         ${TOP_INCDIR}/afs/exporter.h \
45         ${TOP_INCDIR}/afs/nfsclient.h \
46         ${TOP_INCDIR}/afs/unified_afs.h \
47         ${TOP_INCDIR}/afs/sysctl.h
48
49 ${TOP_INCDIR}/afs/afs_consts.h: afs_consts.h
50         ${INSTALL_DATA} $? $@
51
52 ${TOP_INCDIR}/afs/afs.h: afs.h
53         ${INSTALL_DATA} $? $@
54
55 ${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h
56         ${INSTALL_DATA} $? $@
57
58 ${TOP_INCDIR}/afs/exporter.h: exporter.h
59         ${INSTALL_DATA} $? $@
60
61 ${TOP_INCDIR}/afs/nfsclient.h: nfsclient.h
62         ${INSTALL_DATA} $? $@
63
64 ${TOP_INCDIR}/afs/osi_inode.h: ${MKAFS_OSTYPE}/osi_inode.h
65         ${INSTALL_DATA} $? $@
66
67 ${TOP_INCDIR}/afs/sysctl.h: sysctl.h
68         ${INSTALL_DATA} $? $@
69
70 ${TOP_INCDIR}/afs/unified_afs.h: unified_afs.h
71         ${INSTALL_DATA} $? $@
72
73 install: unified_afs.h
74         ${INSTALL} -d ${DESTDIR}${includedir}/afs
75         ${INSTALL_DATA} ${srcdir}/afs.h ${DESTDIR}${includedir}/afs/afs.h
76         ${INSTALL_DATA} ${srcdir}/afs_consts.h ${DESTDIR}${includedir}/afs/afs_consts.h
77         ${INSTALL_DATA} ${srcdir}/afs_stats.h ${DESTDIR}${includedir}/afs/afs_stats.h
78         ${INSTALL_DATA} ${srcdir}/exporter.h ${DESTDIR}${includedir}/afs/exporter.h
79         ${INSTALL_DATA} ${srcdir}/nfsclient.h ${DESTDIR}${includedir}/afs/nfsclient.h
80         ${INSTALL_DATA} ${srcdir}/${MKAFS_OSTYPE}/osi_inode.h \
81             ${DESTDIR}${includedir}/afs/osi_inode.h
82         ${INSTALL_DATA} ${srcdir}/sysctl.h ${DESTDIR}${includedir}/afs/sysctl.h
83         ${INSTALL_DATA} unified_afs.h ${DESTDIR}${includedir}/afs/unified_afs.h
84         ${INSTALL_DATA} afszcm.cat ${DESTDIR}${afsdatadir}/C/afszcm.cat
85         case ${SYS_NAME} in \
86             *linux*) \
87                 ${INSTALL_DATA} ${srcdir}/${MKAFS_OSTYPE}/osi_vfs.h \
88                     ${DESTDIR}${includedir}/afs/osi_vfs.h || true ;;\
89             *) \
90                 echo No vfs headers to install for ${SYS_NAME};; \
91         esac
92
93 dest: unified_afs.h
94         ${INSTALL} -d ${DEST}/include/afs
95         ${INSTALL_DATA} ${srcdir}/afs.h ${DEST}/include/afs/afs.h
96         ${INSTALL_DATA} ${srcdir}/afs_consts.h ${DEST}/include/afs/afs_consts.h
97         ${INSTALL_DATA} ${srcdir}/afs_stats.h ${DEST}/include/afs/afs_stats.h
98         ${INSTALL_DATA} ${srcdir}/exporter.h ${DEST}/include/afs/exporter.h
99         ${INSTALL_DATA} ${srcdir}/nfsclient.h ${DEST}/include/afs/nfsclient.h
100         ${INSTALL_DATA} ${srcdir}/${MKAFS_OSTYPE}/osi_inode.h ${DEST}/include/afs/osi_inode.h
101         ${INSTALL_DATA} ${srcdir}/sysctl.h ${DEST}/include/afs/sysctl.h
102         ${INSTALL_DATA} unified_afs.h ${DEST}/include/afs/unified_afs.h
103         ${INSTALL_DATA} afszcm.cat ${DEST}/root.client/usr/vice/etc/C/afszcm.cat
104         case ${SYS_NAME} in \
105             *linux*) \
106                 ${INSTALL_DATA} ${srcdir}/${MKAFS_OSTYPE}/osi_vfs.h \
107                     ${DEST}/include/afs/osi_vfs.h || true ;;\
108             *) \
109                 echo No vfs headers to install for ${SYS_NAME};; \
110         esac
111
112 clean:
113         -$(RM) -f *.o core AFS_component_version_number.c afs_trace.h afs_trace.msf afszcm.cat
114         -$(RM) -f unified_afs.c unified_afs.h
115
116 include ../config/Makefile.version