1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1995 Regents of the University of Michigan.
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.
12 # ldbm backend to stand-alone LDAP server makefile
14 #-----------------------------------------------------------------------------
16 HDIR = $(LDAPSRC)/include
17 LDIR = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
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 \
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 \
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)
37 -@echo "$(SLAPD_BACKENDS)" | grep LDAP_LDBM 2>&1 > /dev/null; \
38 if [ $$? = 0 ]; then \
39 $(MAKE) $(MFLAGS) CC="$(CC)" libback-ldbm.a; \
41 echo "Include -DLDAP_LDBM in SLAPD_BACKENDS in the"; \
42 echo "Make-common file to build the ldbm backend"; \
45 libback-ldbm.a: version.o
46 $(AR) ruv $@ $(OBJS) version.o
47 @if [ ! -z "$(RANLIB)" ]; then \
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}|" \
61 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
64 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
67 $(RM) libback-ldbm.a *.o core a.out version.c
70 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)