Make-template 5.75 KB
Newer Older
Kurt Zeilenga's avatar
Kurt Zeilenga committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#-----------------------------------------------------------------------------
# Copyright (c) 1995 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
#       ldbm backend to stand-alone LDAP server makefile
#
#-----------------------------------------------------------------------------
LDAPSRC	= ../../..
HDIR	= $(LDAPSRC)/include
LDIR	= $(LDAPSRC)/libraries
VERSIONFILE = $(LDAPSRC)/build/version

SRCS	= idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \
		index.c id2children.c nextid.c abandon.c compare.c \
		modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
		filterindex.c unbind.c kerberos.c close.c
OBJS	= idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \
		index.o id2children.o nextid.o abandon.o compare.o \
		modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
		filterindex.o unbind.o kerberos.o close.o

INCLUDES= -I. -I.. -I$(HDIR) $(KRBINCLUDEFLAG)
30
DEFINES = $(DEFS) $(LDAP_CRYPT) $(THREADS)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
31
CFLAGS	= $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
32
LDFLAGS	= -L$(LDIR) $(KRBLIBFLAG) $(LDAP_CRYPT_LIB)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
33
34
35
36

all:	FORCE
	-@echo "$(SLAPD_BACKENDS)" | grep LDAP_LDBM 2>&1 > /dev/null; \
	if [ $$? = 0 ]; then \
37
            $(MAKE) $(MFLAGS) CC="$(CC)" libback-ldbm.a; \
Kurt Zeilenga's avatar
Kurt Zeilenga committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	else \
	    echo "Include -DLDAP_LDBM in SLAPD_BACKENDS in the"; \
	    echo "Make-common file to build the ldbm backend"; \
        fi

libback-ldbm.a:	version.o
	$(AR) ruv $@ $(OBJS) version.o
	@if [ ! -z "$(RANLIB)" ]; then \
		$(RANLIB) $@; \
	fi
	@touch ../.backend

version.c: $(OBJS)
	$(RM) $@
	(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
	t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
	-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
	-e "s|%VERSION%|$${v}|" \
	< Version.c > $@)

lint:	FORCE
	$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)

5lint:	FORCE
	$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)

clean:	FORCE
	$(RM) libback-ldbm.a *.o core a.out version.c

depend:	FORCE
	$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)

links:
	@$(LN) .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
idl.o: idl.c ../../../include/avl.h ../../../include/proto-lber.h
idl.o: ../../../include/proto-ldap.h ../../../include/ldif.h back-ldbm.h
add.o: add.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
add.o: ../../../include/ldif.h ../../../include/ldbm.h
search.o: search.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
search.o: ../../../include/ldif.h ../../../include/ldbm.h
cache.o: cache.c ../../../include/avl.h ../../../include/proto-lber.h
cache.o: ../../../include/proto-ldap.h ../../../include/ldif.h
cache.o: ../../../include/ldbm.h
dbcache.o: dbcache.c ../../../include/portable.h ../../../include/avl.h
dbcache.o: ../../../include/proto-lber.h ../../../include/proto-ldap.h
dbcache.o: ../../../include/ldif.h back-ldbm.h
dn2id.o: dn2id.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
dn2id.o: ../../../include/ldif.h ../../../include/ldbm.h
id2entry.o: id2entry.c ../../../include/avl.h ../../../include/proto-lber.h
id2entry.o: ../../../include/proto-ldap.h ../../../include/ldif.h
id2entry.o: ../../../include/ldbm.h
92
93
94
index.o: index.c ../../../include/avl.h ../../../include/proto-lber.h
index.o: ../../../include/proto-ldap.h ../../../include/ldif.h
index.o: ../../../include/ldbm.h
95
96
id2children.o: id2children.c ../../../include/proto-lber.h
id2children.o: ../../../include/proto-ldap.h ../../../include/ldif.h
Kurt Zeilenga's avatar
Kurt Zeilenga committed
97
id2children.o: ../../../include/ldbm.h
98
99
100
nextid.o: nextid.c ../../../include/avl.h ../../../include/proto-lber.h
nextid.o: ../../../include/proto-ldap.h ../../../include/ldif.h
nextid.o: ../../../include/ldbm.h
Kurt Zeilenga's avatar
Kurt Zeilenga committed
101
abandon.o: abandon.c
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
compare.o: compare.c ../../../include/proto-lber.h
compare.o: ../../../include/proto-ldap.h ../../../include/ldif.h
compare.o: ../../../include/ldbm.h
modify.o: modify.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
modify.o: ../../../include/ldif.h ../../../include/ldbm.h
modrdn.o: modrdn.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
modrdn.o: ../../../include/ldif.h ../../../include/ldbm.h
delete.o: delete.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
delete.o: ../../../include/ldif.h ../../../include/ldbm.h
init.o: init.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
init.o: ../../../include/ldif.h ../../../include/ldbm.h
config.o: config.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
config.o: ../../../include/ldif.h ../../../include/ldbm.h
bind.o: bind.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
bind.o: ../../../include/ldif.h ../../../include/ldbm.h
attr.o: attr.c ../../../include/proto-lber.h ../../../include/proto-ldap.h
attr.o: ../../../include/ldif.h ../../../include/ldbm.h
filterindex.o: filterindex.c ../../../include/avl.h
filterindex.o: ../../../include/proto-lber.h ../../../include/proto-ldap.h
filterindex.o: ../../../include/ldif.h ../../../include/ldbm.h
unbind.o: unbind.c ../../../include/avl.h ../../../include/proto-lber.h
unbind.o: ../../../include/proto-ldap.h ../../../include/ldif.h
kerberos.o: kerberos.c ../../../include/proto-lber.h
kerberos.o: ../../../include/proto-ldap.h ../../../include/ldif.h
kerberos.o: ../../../include/ldbm.h
close.o: close.c ../../../include/avl.h ../../../include/proto-lber.h
close.o: ../../../include/proto-ldap.h ../../../include/ldif.h
close.o: ../../../include/ldbm.h
Kurt Zeilenga's avatar
Kurt Zeilenga committed
130
131

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY