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