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