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