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