8eb0f961c35b62d73281dc4d3dfa26539fc55c11
[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 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 all: \
18         ${TOP_LIBDIR}/libdir.a \
19         depinstall
20
21 depinstall: \
22         ${TOP_INCDIR}/afs/dir.h 
23
24 ${TOP_INCDIR}/afs/dir.h: dir.h
25         ${INSTALL_DATA} $? $@
26
27 ${TOP_LIBDIR}/libdir.a: libdir.a
28         ${INSTALL_DATA} $? $@
29
30 libdir.a: buffer.o dir.o salvage.o AFS_component_version_number.o
31         $(RM) -f $@
32         $(AR) crv $@ buffer.o dir.o salvage.o  AFS_component_version_number.o
33         $(RANLIB) $@
34
35 test: 
36         cd test; $(MAKE)
37
38 buffer.o: buffer.c
39
40 dir.o: dir.c dir.h
41
42 salvage.o: salvage.c dir.h
43
44
45 #
46 # Install targets
47 #
48 install: libdir.a dir.h
49         ${INSTALL} -d ${DESTDIR}${libdir}/afs
50         ${INSTALL} -d ${DESTDIR}${includedir}/afs
51         ${INSTALL_DATA} libdir.a ${DESTDIR}${libdir}/afs/libdir.a
52         ${INSTALL_DATA} ${srcdir}/dir.h ${DESTDIR}${includedir}/afs/dir.h
53
54 dest: libdir.a dir.h
55         ${INSTALL} -d ${DEST}/lib/afs
56         ${INSTALL} -d ${DEST}/include/afs
57         ${INSTALL_DATA} libdir.a ${DEST}/lib/afs/libdir.a
58         ${INSTALL_DATA} ${srcdir}/dir.h ${DEST}/include/afs/dir.h
59
60 #
61 # Misc. targets
62 #
63 clean:
64         $(RM) -f *.o *.a core AFS_component_version_number.c
65
66 include ../config/Makefile.version