6640779ea2d1493b7c9639ca29ae58cb64880834
[openafs.git] / src / opr / Makefile.in
1 srcdir=@srcdir@
2 include @TOP_OBJDIR@/src/config/Makefile.config
3 include @TOP_OBJDIR@/src/config/Makefile.shared
4
5 objects = assert.o casestrcpy.o rbtree.o
6
7 HEADERS = $(TOP_INCDIR)/afs/opr.h \
8           $(TOP_INCDIR)/afs/opr_assert.h \
9           $(TOP_INCDIR)/opr/jhash.h \
10           $(TOP_INCDIR)/opr/queue.h \
11           $(TOP_INCDIR)/opr/rbtree.h \
12           $(TOP_INCDIR)/opr/time.h
13
14 all: $(HEADERS) $(TOP_LIBDIR)/libopr.a
15
16 libopr.a: $(objects)
17         -$(RM) -f $@
18         $(AR) crv $@ $(objects)
19         $(RANLIB) $@
20
21 $(TOP_LIBDIR)/libopr.a: libopr.a
22         $(INSTALL_DATA) libopr.a $@
23
24 $(TOP_INCDIR)/afs/opr.h: opr.h
25         $(INSTALL_DATA) $? $@
26
27 $(TOP_INCDIR)/afs/opr_assert.h: ${srcdir}/opr_assert.h
28         $(INSTALL_DATA) $? $@
29
30 $(TOP_INCDIR)/opr/jhash.h: ${srcdir}/jhash.h
31         $(INSTALL_DATA) $? $@
32
33 $(TOP_INCDIR)/opr/queue.h: ${srcdir}/queue.h
34         $(INSTALL_DATA) $? $@
35
36 $(TOP_INCDIR)/opr/rbtree.h: ${srcdir}/rbtree.h
37         $(INSTALL_DATA) $? $@
38
39 $(TOP_INCDIR)/opr/time.h: ${srcdir}/opr_time.h
40         $(INSTALL_DATA) $? $@
41
42 clean:
43         rm -f $(objects) libopr.a
44
45 install: libopr.a
46         $(INSTALL_DATA) libopr.a $(DESTDIR)$(libdir)/libopr.a
47         $(INSTALL) -d $(DESTDIR)$(includedir)/opr
48         $(INSTALL_DATA) ${srcdir}/queue.h $(DESTDIR)$(includedir)/opr/queue.h
49
50 dest: libopr.a
51         $(INSTALL_DATA) libopr.a $(DEST)/lib/libopr.a
52         $(INSTALL) -d $(DEST)/include/opr
53         $(INSTALL_DATA) ${srcdir}/queue.h $(DEST)/include/opr/queue.h
54
55
56 buildtools: $(HEADERS) $(TOP_LIBDIR)/libopr.a
57