4c8d79b7d7d705fdbc9817b4d4224f1cdee36238
[openafs.git] / src / config / 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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.lwp
11
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16
17 INST=$(RM) -f $@; $(CP) $? $@
18
19 all: config mkvers \
20         ${TOP_INCDIR}/afs/param.h \
21         ${TOP_INCDIR}/afs/stds.h \
22         ${TOP_INCDIR}/afs/afs_sysnames.h \
23         ${TOP_INCDIR}/afs/afs_args.h \
24         ${TOP_INCDIR}/afs/icl.h \
25         ${TOP_INCDIR}/afs/venus.h \
26         ${TOP_INCDIR}/afs/vioc.h \
27         ${TOP_INCDIR}/afs/debug.h
28
29 buildtools: \
30         config \
31         mkvers \
32         ${TOP_INCDIR}/afs/param.h \
33         ${TOP_INCDIR}/afs/afs_sysnames.h \
34         ${TOP_INCDIR}/afs/stds.h
35
36 Makefile.version: Makefile.version-CML Makefile.version-NOCML
37         $(RM) -f Makefile.version
38         if      [ -r @TOP_SRCDIR@/CML/state ] ; \
39         then    $(CP) Makefile.version-CML Makefile.version ; \
40         else    $(CP) Makefile.version-NOCML Makefile.version ; \
41         fi
42
43 #
44 # AFS component version string file generation targets
45 #
46 AFS_component_version_number.c: Makefile.version
47         $(MAKE) -f Makefile.version AFS_component_version_number.c
48
49 #
50 # App build/install targets
51 #
52 config: config.o mc.o
53         $(AFS_LDRULE) config.o mc.o
54
55 mkvers: mkvers.c
56         $(CC) $(AFS_CPPFLAGS) $(AFS_CFLAGS) $(AFS_LDFLAGS) \
57                 -o mkvers ${srcdir}/mkvers.c
58
59 config.o: config.c AFS_component_version_number.c
60
61 #
62 # Include installation targets
63 #
64
65 # XXX inlined INST
66 ${DEST}/include/afs/param.h ${DESTDIR}${includedir}/afs/param.h ${TOP_INCDIR}/afs/param.h: ${srcdir}/param.${SYS_NAME}.h ${AFS_PARAM_COMMON}
67         if [ "X${AFS_PARAM_COMMON}" != "X" ] ; then \
68                 cat ${srcdir}/${AFS_PARAM_COMMON} ${srcdir}/param.${SYS_NAME}.h > param.h.new ; \
69                 $(RM) -f $@; \
70                  $(CP) param.h.new $@ ; \
71         else \
72                 $(RM) -f $@; $(CP) ${srcdir}/param.${SYS_NAME}.h $@ ; \
73         fi
74
75 ${DEST}/include/afs/afs_sysnames.h ${DESTDIR}${includedir}/afs/afs_sysnames.h ${TOP_INCDIR}/afs/afs_sysnames.h: ${srcdir}/afs_sysnames.h
76         $(INST)
77
78 ${DEST}/include/afs/stds.h ${DESTDIR}${includedir}/afs/stds.h ${TOP_INCDIR}/afs/stds.h: ${srcdir}/stds.h
79         $(INST)
80
81 ${DEST}/include/afs/icl.h ${DESTDIR}${includedir}/afs/icl.h ${TOP_INCDIR}/afs/icl.h: ${srcdir}/icl.h 
82         $(INST)
83
84 ${DEST}/include/afs/afs_args.h ${DESTDIR}${includedir}/afs/afs_args.h ${TOP_INCDIR}/afs/afs_args.h: ${srcdir}/afs_args.h 
85         $(INST)
86
87 ${DEST}/include/afs/venus.h ${DESTDIR}${includedir}/afs/venus.h ${TOP_INCDIR}/afs/venus.h: ${srcdir}/venus.h 
88         $(INST)
89
90 ${DEST}/include/afs/vioc.h ${DESTDIR}${includedir}/afs/vioc.h ${TOP_INCDIR}/afs/vioc.h: ${srcdir}/vioc.h 
91         $(INST)
92
93 ${DEST}/include/afs/debug.h ${DESTDIR}${includedir}/afs/debug.h ${TOP_INCDIR}/afs/debug.h: ${srcdir}/debug.h 
94         $(INST)
95
96 # these are needed to compile the kernel.  Config is necessary to
97 # convert the MakefileProto in libafs and the kernel links provide the
98 # kernel include environment.  param.h is, well, param.h.  The afs_sysnames.h
99 # file is needed by param.h to create unique identifiers for each SYS_TYPE.
100
101 install: ${DESTDIR}${includedir}/afs/param.h \
102         ${DESTDIR}${includedir}/afs/stds.h \
103         ${DESTDIR}${includedir}/afs/afs_sysnames.h \
104         ${DESTDIR}${includedir}/afs/afs_args.h \
105         ${DESTDIR}${includedir}/afs/icl.h \
106         ${DESTDIR}${includedir}/afs/venus.h \
107         ${DESTDIR}${includedir}/afs/vioc.h \
108         ${DESTDIR}${includedir}/afs/debug.h
109
110 clean:
111         $(RM) -f *.o config mkvers core xprt AFS_component_version_number.c param.h.new Makefile.version.in
112
113 dest: ${DEST}/include/afs/param.h \
114         ${DEST}/include/afs/stds.h \
115         ${DEST}/include/afs/afs_sysnames.h \
116         ${DEST}/include/afs/afs_args.h \
117         ${DEST}/include/afs/icl.h \
118         ${DEST}/include/afs/venus.h \
119         ${DEST}/include/afs/vioc.h \
120         ${DEST}/include/afs/debug.h
121