51a484258cfb7a0d9f7e5bbe30539e1b09551d27
[openafs.git] / src / dir / 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
32 include ../config/Makefile.${SYS_NAME}
33
34 KERNELDIR = ../libafs
35 UKERNELDIR = ../libuafs
36
37 INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XINCLS}
38 CFLAGS = ${OPTMZ} ${INCDIRS} ${XCFLAGS}
39
40 all: \
41         ${TOP_LIBDIR}/libdir.a \
42         ${TOP_INCDIR}/afs/dir.h \
43         ${KERNELDIR}/afs \
44         ${KERNELDIR}/afs/dir.h \
45         ${KERNELDIR}/afs/afs_dir.c \
46         ${UKERNELDIR}/afs \
47         ${UKERNELDIR}/afs/dir.h \
48         ${UKERNELDIR}/afs/afs_dir.c
49
50 libdir.a: buffer.o dir.o salvage.o AFS_component_version_number.o
51         $(RM) -f $@
52         $(AR) crv $@ buffer.o dir.o salvage.o  AFS_component_version_number.o
53         $(RANLIB) $@
54
55 test: 
56         cd test; $(MAKE)
57
58 buffer.o: buffer.c
59
60 dir.o: dir.c dir.h
61
62 salvage.o: salvage.c dir.h
63
64
65 #
66 # Install targets
67 #
68 ${TOP_INCDIR}/afs/dir.h: dir.h
69         ${INSTALL} $? $@
70
71 ${TOP_LIBDIR}/libdir.a: libdir.a
72         ${INSTALL} $? $@
73
74 ${KERNELDIR}/afs:
75         mkdir -p $@
76
77 ${UKERNELDIR}/afs:
78         mkdir -p $@
79
80 ${KERNELDIR}/afs/dir.h: dir.h
81         ${INSTALL} $? $@
82
83 ${KERNELDIR}/afs/afs_dir.c: dir.c
84         ${INSTALL} $? $@
85
86 ${UKERNELDIR}/afs/dir.h: dir.h
87         ${INSTALL} $? $@
88
89 ${UKERNELDIR}/afs/afs_dir.c: dir.c
90         ${INSTALL} $? $@
91
92 install: \
93         ${DESTDIR}${libdir}/afs/libdir.a \
94         ${DESTDIR}${includedir}/afs/dir.h
95
96 ${DESTDIR}${libdir}/afs/libdir.a: libdir.a
97         ${INSTALL} $? $@
98
99 ${DESTDIR}${includedir}/afs/dir.h: dir.h
100         ${INSTALL} $? $@
101
102 dest: \
103         ${DEST}/lib/afs/libdir.a \
104         ${DEST}/include/afs/dir.h
105
106 ${DEST}/lib/afs/libdir.a: libdir.a
107         ${INSTALL} $? $@
108
109 ${DEST}/include/afs/dir.h: dir.h
110         ${INSTALL} $? $@
111
112 #
113 # Misc. targets
114 #
115 include ../config/Makefile.version
116
117 clean:
118         $(RM) -f *.o *.a core AFS_component_version_number.c