]> git.sur5r.net Git - openldap/blob - servers/slapd/back-shell/Make-template
Initial revision
[openldap] / servers / slapd / back-shell / 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 #       shell 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    = 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
24
25 INCLUDES= -I. -I.. -I$(HDIR)
26 DEFINES = $(DEFS) $(THREADS)
27 CFLAGS  = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
28
29 all:    FORCE
30         -@echo "$(SLAPD_BACKENDS)" | grep LDAP_SHELL 2>&1 > /dev/null; \
31         if [ $$? = 0 ]; then \
32             $(MAKE) $(MFLAGS) CC=$(CC) libback-shell.a; \
33         else \
34             echo "Include -DLDAP_SHELL in SLAPD_BACKENDS in the"; \
35             echo "Make-common file to build the shell backend"; \
36         fi
37
38
39 libback-shell.a:        version.o
40         $(AR) ruv $@ $(OBJS) version.o
41         @if [ ! -z "$(RANLIB)" ]; then \
42                 $(RANLIB) $@; \
43         fi
44         @touch ../.backend
45
46 version.c: $(OBJS)
47         $(RM) $@
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}|" \
52         < Version.c > $@)
53
54 install:        FORCE
55
56 lint:   FORCE
57         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
58
59 5lint:  FORCE
60         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
61
62 clean:  FORCE
63         $(RM) libback-shell.a *.o core a.out version.c
64
65 depend: FORCE
66         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
67
68 links:
69         @$(LN) .src/*.[ch] .
70 # DO NOT DELETE THIS LINE -- mkdep uses it.
71 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
72
73 init.o: init.c ../slap.h ../../../include/avl.h ../../../include/lber.h
74 init.o: ../../../include/ldap.h ../../../include/lthread.h
75 init.o: ../../../include/ldif.h shell.h
76 config.o: config.c ../slap.h ../../../include/avl.h ../../../include/lber.h
77 config.o: ../../../include/ldap.h ../../../include/lthread.h
78 config.o: ../../../include/ldif.h shell.h
79 fork.o: fork.c ../slap.h ../../../include/avl.h ../../../include/lber.h
80 fork.o: ../../../include/ldap.h ../../../include/lthread.h
81 fork.o: ../../../include/ldif.h
82 search.o: search.c ../slap.h ../../../include/avl.h ../../../include/lber.h
83 search.o: ../../../include/ldap.h ../../../include/lthread.h
84 search.o: ../../../include/ldif.h shell.h
85 bind.o: bind.c ../slap.h ../../../include/avl.h ../../../include/lber.h
86 bind.o: ../../../include/ldap.h ../../../include/lthread.h
87 bind.o: ../../../include/ldif.h shell.h
88 unbind.o: unbind.c ../slap.h ../../../include/avl.h ../../../include/lber.h
89 unbind.o: ../../../include/ldap.h ../../../include/lthread.h
90 unbind.o: ../../../include/ldif.h shell.h
91 add.o: add.c ../slap.h ../../../include/avl.h ../../../include/lber.h
92 add.o: ../../../include/ldap.h ../../../include/lthread.h
93 add.o: ../../../include/ldif.h shell.h
94 delete.o: delete.c ../slap.h ../../../include/avl.h ../../../include/lber.h
95 delete.o: ../../../include/ldap.h ../../../include/lthread.h
96 delete.o: ../../../include/ldif.h shell.h
97 modify.o: modify.c ../slap.h ../../../include/avl.h ../../../include/lber.h
98 modify.o: ../../../include/ldap.h ../../../include/lthread.h
99 modify.o: ../../../include/ldif.h shell.h
100 modrdn.o: modrdn.c ../slap.h ../../../include/avl.h ../../../include/lber.h
101 modrdn.o: ../../../include/ldap.h ../../../include/lthread.h
102 modrdn.o: ../../../include/ldif.h shell.h
103 compare.o: compare.c ../slap.h ../../../include/avl.h ../../../include/lber.h
104 compare.o: ../../../include/ldap.h ../../../include/lthread.h
105 compare.o: ../../../include/ldif.h shell.h
106 abandon.o: abandon.c ../slap.h ../../../include/avl.h ../../../include/lber.h
107 abandon.o: ../../../include/ldap.h ../../../include/lthread.h
108 abandon.o: ../../../include/ldif.h shell.h
109 result.o: result.c ../slap.h ../../../include/avl.h ../../../include/lber.h
110 result.o: ../../../include/ldap.h ../../../include/lthread.h
111 result.o: ../../../include/ldif.h shell.h
112
113 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY