makefile-updates-20010828
[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 DESTDIR=@DESTDIR@
9 SRCDIR=@SRCDIR@
10 TOP_SRCDIR=@TOP_SRCDIR@
11 SYS_NAME=@AFS_SYSNAME@
12
13 SHELL = /bin/sh
14
15 include ../config/Makefile.${SYS_NAME}
16
17 KERNELDIR = ../libafs/
18 UKERNELDIR = ../libuafs/
19 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
20
21 INCDIRS= -I${TOP_SRCDIR}/config -I${DESTDIR}/include ${XINCLS}
22 CFLAGS = ${OPTMZ} ${INCDIRS} ${XCFLAGS}
23
24 OBJS=buffer.o dir.o salvage.o
25 include ../config/Makefile.version
26
27 system noversion: install
28
29 cmdall: all test
30
31 all: libdir.a
32
33 libdir.a: ${OBJS} AFS_component_version_number.o
34         rm -f libdir.a
35         ar rv libdir.a $(OBJS) AFS_component_version_number.o
36         $(RANLIB) libdir.a
37
38 kinstall:
39         ${INSTALL} dir.h ${KERNELDIR}/afs
40         ${INSTALL} dir.c ${KERNELDIR}/afs/afs_dir.c
41
42 ukinstall webinstall:
43         set ${UKERNELDIR}/afs; $(MKDIR_IF_NEEDED)
44         ${INSTALL} dir.h ${UKERNELDIR}/afs
45         ${INSTALL} dir.c ${UKERNELDIR}/afs/afs_dir.c
46
47 install:        all kinstall ukinstall
48         ${INSTALL} libdir.a ${DESTDIR}/lib/afs
49         ${INSTALL} dir.h ${DESTDIR}/include/afs
50
51 test: 
52         (cd test; $(MAKE) )
53
54 buffer.o: buffer.c
55
56 dir.o: dir.c dir.h
57
58 salvage.o: salvage.c dir.h
59
60 clean:
61         rm -f *.o *.a core AFS_component_version_number.c