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 # shell backend to stand-alone LDAP server makefile
14 #-----------------------------------------------------------------------------
16 HDIR = $(LDAPSRC)/include
17 LDIR = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
20 SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \
21 modify.c modrdn.c compare.c abandon.c result.c
22 OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \
23 modify.o modrdn.o compare.o abandon.o result.o
25 INCLUDES= -I. -I.. -I$(HDIR)
26 DEFINES = $(DEFS) $(THREADS)
27 CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
30 -@echo "$(SLAPD_BACKENDS)" | grep LDAP_SHELL 2>&1 > /dev/null; \
31 if [ $$? = 0 ]; then \
32 $(MAKE) $(MFLAGS) CC=$(CC) libback-shell.a; \
34 echo "Include -DLDAP_SHELL in SLAPD_BACKENDS in the"; \
35 echo "Make-common file to build the shell backend"; \
39 libback-shell.a: version.o
40 $(AR) ruv $@ $(OBJS) version.o
41 @if [ ! -z "$(RANLIB)" ]; then \
48 (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
49 t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
50 -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
51 -e "s|%VERSION%|$${v}|" \
57 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
60 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
63 $(RM) libback-shell.a *.o core a.out version.c
66 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
70 # DO NOT DELETE THIS LINE -- mkdep uses it.
71 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
73 init.o: init.c ../../../include/avl.h ../../../include/proto-lber.h
74 init.o: ../../../include/proto-ldap.h ../../../include/ldif.h
75 config.o: config.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
76 config.o: ../../../include/ldif.h
77 fork.o: fork.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
78 fork.o: ../../../include/ldif.h
79 search.o: search.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
80 search.o: ../../../include/ldif.h
81 bind.o: bind.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
82 bind.o: ../../../include/ldif.h
83 unbind.o: unbind.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
84 unbind.o: ../../../include/ldif.h
85 add.o: add.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
86 add.o: ../../../include/ldif.h
87 delete.o: delete.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
88 delete.o: ../../../include/ldif.h
89 modify.o: modify.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
90 modify.o: ../../../include/ldif.h
91 modrdn.o: modrdn.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
92 modrdn.o: ../../../include/ldif.h
93 compare.o: compare.c ../../../include/proto-lber.h
94 compare.o: ../../../include/proto-ldap.h ../../../include/ldif.h
95 abandon.o: abandon.c ../../../include/avl.h ../../../include/proto-lber.h
96 abandon.o: ../../../include/proto-ldap.h ../../../include/ldif.h
97 result.o: result.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
98 result.o: ../../../include/ldif.h
100 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY