]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/Make-template
Added Will Ballantyne's General Aliasing code.
[openldap] / servers / slapd / back-ldbm / 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 #       ldbm backend to stand-alone LDAP server makefile
13 #
14 #-----------------------------------------------------------------------------
15 LDAPSRC = ../../..
16 HDIR    = $(LDAPSRC)/include
17 LDIR    = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
19
20 SRCS    = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \
21                 index.c id2children.c nextid.c abandon.c compare.c \
22                 modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
23                 filterindex.c unbind.c kerberos.c close.c group.c \
24                 alias.c
25 OBJS    = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \
26                 index.o id2children.o nextid.o abandon.o compare.o \
27                 modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
28                 filterindex.o unbind.o kerberos.o close.o group.o \
29                 alias.o
30
31 INCLUDES= -I. -I.. -I$(HDIR) $(KRBINCLUDEFLAG)
32 DEFINES = $(DEFS) $(SERVERDEFS) $(THREADS)
33 CFLAGS  = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
34 LDFLAGS = -L$(LDIR) $(KRBLIBFLAG) $(LDAP_CRYPT_LIB)
35
36 all:    FORCE
37         -@echo "$(SLAPD_BACKENDS)" | grep LDAP_LDBM 2>&1 > /dev/null; \
38         if [ $$? = 0 ]; then \
39             $(MAKE) $(MFLAGS) CC="$(CC)" libback-ldbm.a; \
40         else \
41             echo "Include -DLDAP_LDBM in SLAPD_BACKENDS in the"; \
42             echo "Make-common file to build the ldbm backend"; \
43         fi
44
45 libback-ldbm.a: version.o
46         $(AR) ruv $@ $(OBJS) version.o
47         @if [ ! -z "$(RANLIB)" ]; then \
48                 $(RANLIB) $@; \
49         fi
50         @touch ../.backend
51
52 version.c: $(OBJS)
53         $(RM) $@
54         (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
55         t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
56         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
57         -e "s|%VERSION%|$${v}|" \
58         < Version.c > $@)
59
60 lint:   FORCE
61         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
62
63 5lint:  FORCE
64         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
65
66 clean:  FORCE
67         $(RM) libback-ldbm.a *.o core a.out version.c
68
69 depend: FORCE
70         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
71
72 links:
73         @$(LN) .src/*.[ch] .
74