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 # /etc/passwd file backend to stand-alone LDAP server makefile
14 #-----------------------------------------------------------------------------
16 HDIR = $(LDAPSRC)/include
17 LDIR = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
20 SRCS = search.c config.c
21 OBJS = search.o config.o
23 INCLUDES= -I. -I.. -I$(HDIR)
24 DEFINES = $(DEFS) $(THREADS)
25 CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
28 -@echo "$(SLAPD_BACKENDS)" | grep LDAP_PASSWD 2>&1 > /dev/null; \
29 if [ $$? = 0 ]; then \
30 $(MAKE) $(MFLAGS) CC=$(CC) libback-passwd.a; \
32 echo "Include -DLDAP_PASSWD in SLAPD_BACKENDS in the"; \
33 echo "Make-common file to build the passwd backend"; \
37 libback-passwd.a: version.o
38 $(AR) ruv $@ $(OBJS) version.o
39 @if [ ! -z "$(RANLIB)" ]; then \
46 (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
47 t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
48 -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
49 -e "s|%VERSION%|$${v}|" \
55 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
58 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
61 $(RM) libback-passwd.a *.o core a.out version.c
64 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
68 # DO NOT DELETE THIS LINE -- mkdep uses it.
69 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
71 search.o: search.c ../../../include/portable.h ../../../include/avl.h
72 search.o: ../../../include/proto-lber.h ../../../include/proto-ldap.h
73 search.o: ../../../include/ldif.h
74 config.o: config.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
75 config.o: ../../../include/ldif.h
77 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY