]> git.sur5r.net Git - openldap/blob - servers/slapd/back-passwd/Make-template
Modified make system to support CVS instead of RCS
[openldap] / servers / slapd / back-passwd / 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 #       /etc/passwd file 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    = search.c config.c
21 OBJS    = search.o config.o
22
23 INCLUDES= -I. -I.. -I$(HDIR)
24 DEFINES = $(DEFS) $(THREADS)
25 CFLAGS  = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
26
27 all:    FORCE
28         -@echo "$(SLAPD_BACKENDS)" | grep LDAP_PASSWD 2>&1 > /dev/null; \
29         if [ $$? = 0 ]; then \
30             $(MAKE) $(MFLAGS) CC=$(CC) libback-passwd.a; \
31         else \
32             echo "Include -DLDAP_PASSWD in SLAPD_BACKENDS in the"; \
33             echo "Make-common file to build the passwd backend"; \
34         fi
35
36
37 libback-passwd.a:       version.o
38         $(AR) ruv $@ $(OBJS) version.o
39         @if [ ! -z "$(RANLIB)" ]; then \
40                 $(RANLIB) $@; \
41         fi
42         @touch ../.backend
43
44 version.c: $(OBJS)
45         $(RM) $@
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}|" \
50         < Version.c > $@)
51
52 install:        FORCE
53
54 lint:   FORCE
55         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
56
57 5lint:  FORCE
58         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
59
60 clean:  FORCE
61         $(RM) libback-passwd.a *.o core a.out version.c
62
63 depend: FORCE
64         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
65
66 links:
67         @$(LN) .src/*.[ch] .
68 # DO NOT DELETE THIS LINE -- mkdep uses it.
69 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
70
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
76
77 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY