]> git.sur5r.net Git - openldap/blob - libraries/libldbm/Make-template
09ad2ee08fae3fd355abebfda8bf0ebe77cdbcd5
[openldap] / libraries / libldbm / Make-template
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1995 Regents of the University of Michigan.
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms are permitted
6 # provided that this notice is preserved and that due credit is given
7 # to the University of Michigan at Ann Arbor. The name of the University
8 # may not be used to endorse or promote products derived from this
9 # software without specific prior written permission. This software
10 # is provided ``as is'' without express or implied warranty.
11 #
12 #       avl library makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC = ../..
17
18 SRCS    = ldbm.c
19 OBJS    = ldbm.o
20
21 HDIR    = ../../include
22
23 INCLUDES= -I$(HDIR)
24 DEFINES = $(DEFS)
25
26 CFLAGS  = $(INCLUDES) $(DEFINES) $(ACFLAGS)
27
28 all:    libldbm.a
29
30 libldbm.a:      version.o
31         $(AR) ruv $@ $(OBJS) version.o
32         @if [ ! -z "$(RANLIB)" ]; then \
33                 $(RANLIB) $@; \
34         fi; \
35         $(RM) ../$@; \
36         $(LN) libldbm/$@ ../$@
37
38 testldbm:       libldbm.a testldbm.o
39         $(CC) $(ALDFLAGS) -o $@ testldbm.o -L. -lavl
40
41 version.c:      $(OBJS)
42         $(RM) $@
43         (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
44         h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
45         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
46         -e "s|%VERSION%|$${v}|" \
47         < Version.c > $@)
48
49 install:        all
50
51 lint:   FORCE
52         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
53
54 5lint:  FORCE
55         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
56
57 clean:  FORCE
58         $(RM) libldbm.a ../libldbm.a testldbm *.o core a.out version.c
59
60 depend: FORCE
61         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
62
63 links:
64         @$(LN) .src/*.[ch] .
65
66 # DO NOT DELETE THIS LINE -- mkdep uses it.
67 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
68
69 ldbm.o: ldbm.c ../../include/ldbm.h
70
71 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY