openldap/servers/slapd/Make-template
1998-08-15 23:03:09 +00:00

247 lines
9.3 KiB
Plaintext

#-----------------------------------------------------------------------------
# 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.
#
# Stand alone LDAP server daemon makefile
#
#-----------------------------------------------------------------------------
LDAPSRC = ../..
HDIR = $(LDAPSRC)/include
LDIR = $(LDAPSRC)/libraries
VERSIONFILE = $(LDAPSRC)/build/version
SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \
attr.c entry.c config.c backend.c result.c operation.c \
dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \
value.c ava.c bind.c unbind.c abandon.c filterentry.c \
phonetic.c regex.c acl.c str2filter.c aclparse.c init.c \
detach.c strdup.c tempnam.c repl.c lock.c \
schema.c schemaparse.c monitor.c configinfo.c
OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
attr.o entry.o config.o backend.o result.o operation.o \
dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \
value.o ava.o bind.o unbind.o abandon.o filterentry.o \
phonetic.o regex.o acl.o str2filter.o aclparse.o init.o \
detach.o strdup.o tempnam.o repl.o lock.o \
schema.o schemaparse.o monitor.o configinfo.o
INCLUDES= -I. -I$(HDIR) $(KRBINCLUDEFLAG)
DEFINES = $(DEFS) $(LDAP_CRYPT) $(LDAP_TCP_WRAPPERS) $(SERVERDEFS)
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) $(THREADS)
LDFLAGS = -L$(LDIR) $(KRBLIBFLAG)
LIBS = $(KRBLIBS) -llber -lldbm -lavl -llthread -lldif $(THREADSLIB) \
$(LDBMLIB) $(LDAP_CRYPT_LIB) $(LDAP_TCP_WRAPPERS_LIB) $(ALIBS)
all: FORCE
@if [ -z "$(MAKESLAPD)" ]; then \
echo "uncomment the MAKESLAPD line in Make-common to make slapd"; \
exit 0; \
else \
echo; \
$(MAKE) $(MFLAGS) backendslib; \
$(MAKE) $(MFLAGS) slapd; \
(cd tools; $(MAKE) $(MFLAGS) all); \
fi
backendslib: FORCE
@for i in back-*; do \
if [ -d $$i ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
( cd $$i; $(MAKE) $(MFLAGS) all ); \
fi; \
done; \
echo; \
$(MAKE) $(MFLAGS) libbackends.a
libbackends.a: .backend
@$(RM) -r tmp
@$(MKDIR) tmp
@-for i in back-*/*.a; do \
( \
cd tmp; \
$(AR) x ../$$i; \
pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \
for j in *.o; do \
mv $$j $${pre}$$j; \
done; \
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
$(RM) *.o __.SYMDEF; \
echo "added backend library $$i"; \
); \
done
@mv -f tmp/libbackends.a ./libbackends.a
@$(RM) -r tmp
@if [ ! -z "$(RANLIB)" ]; then \
$(RANLIB) libbackends.a; \
fi
@ls -l libbackends.a
slapd: version.o
$(CC) $(ALDFLAGS) -o slapd $(OBJS) version.o libbackends.a \
$(LDFLAGS) $(LIBS)
slapd.pure: version.o
purify $(CC) $(ALDFLAGS) -o slapd.pure $(OBJS) version.o libbackends.a \
$(LDFLAGS) $(LIBS)
version.c: libbackends.a $(OBJS) $(LDIR)/liblber/liblber.a \
$(LDIR)/libldbm/libldbm.a $(LDIR)/liblthread/liblthread.a \
$(LDIR)/libavl/libavl.a $(LDIR)/libldif/libldif.a
$(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 > $@)
install: all $(ETCDIR) $(ETCDIR)/slapd $(ETCDIR)/slapd.conf \
$(ETCDIR)/slapd.at.conf $(ETCDIR)/slapd.oc.conf \
install-tools
$(ETCDIR)/slapd: slapd
$(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(ETCDIR)
$(ETCDIR)/slapd.conf: slapd.conf
$(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' slapd.conf > /tmp/slapd.$$
-$(MV) $(ETCDIR)/slapd.conf $(ETCDIR)/slapd.conf-
$(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(ETCDIR)/slapd.conf
$(RM) -f /tmp/slapd.$$
$(ETCDIR)/slapd.at.conf: slapd.at.conf
-$(MV) $(ETCDIR)/slapd.at.conf $(ETCDIR)/slapd.at.conf-
$(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(ETCDIR)
$(ETCDIR)/slapd.oc.conf: slapd.oc.conf
-$(MV) $(ETCDIR)/slapd.oc.conf $(ETCDIR)/slapd.oc.conf-
$(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(ETCDIR)
install-tools: FORCE
(cd tools; $(MAKE) $(MFLAGS) install)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
5lint: FORCE
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
clean: FORCE
@echo "making clean in `$(PWD)`"
$(RM) slapd slapd.pure *.o core a.out version.c libbackends.a .backend
@for i in back-* tools; do \
if [ -d $$i -a $$i != "RCS" ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
fi; \
done
depend: FORCE
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
@for i in back-* tools; do \
if [ -d $$i -a $$i != "RCS" ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
fi; \
done
links:
@echo "making links in `$(PWD)`"
@$(LN) .src/*.[ch] .src/*.conf .
@touch .backend
@for i in .src/back-* .src/tools; do \
if [ -d $$i -a $$i != ".src/RCS" ]; then \
d=`basename $$i`; \
( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \
$(LN) ../.src/$$d/Make-template . ; \
$(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \
-f Make-template links ) ; \
fi; \
done;
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
main.o: main.c ../../include/portable.h ../../include/avl.h
main.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldapconfig.h
daemon.o: daemon.c ../../include/avl.h ../../include/ldap.h
daemon.o: ../../include/lthread.h ../../include/portable.h
connection.o: connection.c ../../include/portable.h ../../include/avl.h
connection.o: ../../include/ldap.h ../../include/lthread.h
search.o: search.c ../../include/proto-lber.h ../../include/proto-ldap.h
search.o: ../../include/ldif.h
filter.o: filter.c ../../include/proto-lber.h ../../include/proto-ldap.h
filter.o: ../../include/ldif.h
add.o: add.c ../../include/avl.h ../../include/ldap.h
add.o: ../../include/proto-ldap.h ../../include/ldif.h
charray.o: charray.c ../../include/proto-lber.h ../../include/proto-ldap.h
charray.o: ../../include/ldif.h
attr.o: attr.c ../../include/proto-lber.h ../../include/proto-ldap.h
attr.o: ../../include/ldif.h
entry.o: entry.c ../../include/avl.h ../../include/ldap.h
entry.o: ../../include/lthread.h
config.o: config.c ../../include/proto-lber.h ../../include/proto-ldap.h
config.o: ../../include/ldif.h
backend.o: backend.c ../../include/avl.h ../../include/ldap.h
backend.o: ../../include/lthread.h
result.o: result.c ../../include/portable.h ../../include/avl.h
result.o: ../../include/ldap.h ../../include/lthread.h
operation.o: operation.c ../../include/proto-lber.h ../../include/proto-ldap.h
operation.o: ../../include/ldif.h
dn.o: dn.c ../../include/portable.h ../../include/avl.h ../../include/ldap.h
dn.o: ../../include/lthread.h
compare.o: compare.c ../../include/avl.h ../../include/ldap.h
compare.o: ../../include/lthread.h
modify.o: modify.c ../../include/avl.h ../../include/ldap.h
modify.o: ../../include/proto-ldap.h ../../include/ldif.h
delete.o: delete.c ../../include/proto-lber.h ../../include/proto-ldap.h
delete.o: ../../include/ldif.h
modrdn.o: modrdn.c ../../include/proto-lber.h ../../include/proto-ldap.h
modrdn.o: ../../include/ldif.h
ch_malloc.o: ch_malloc.c ../../include/avl.h ../../include/ldap.h
ch_malloc.o: ../../include/lthread.h
value.o: value.c ../../include/portable.h ../../include/avl.h
value.o: ../../include/ldap.h ../../include/lthread.h
ava.o: ava.c ../../include/proto-lber.h ../../include/proto-ldap.h
ava.o: ../../include/ldif.h
bind.o: bind.c ../../include/proto-lber.h ../../include/proto-ldap.h
bind.o: ../../include/ldif.h
unbind.o: unbind.c ../../include/avl.h ../../include/ldap.h
unbind.o: ../../include/lthread.h
abandon.o: abandon.c ../../include/avl.h ../../include/ldap.h
abandon.o: ../../include/lthread.h
filterentry.o: filterentry.c ../../include/proto-lber.h
filterentry.o: ../../include/proto-ldap.h ../../include/ldif.h
phonetic.o: phonetic.c ../../include/portable.h ../../include/avl.h
phonetic.o: ../../include/ldap.h ../../include/lthread.h
regex.o: regex.c
acl.o: acl.c slap.h ../../include/proto-lber.h ../../include/proto-ldap.h
acl.o: ../../include/ldif.h
str2filter.o: str2filter.c ../../include/avl.h ../../include/ldap.h
str2filter.o: ../../include/lthread.h
aclparse.o: aclparse.c slap.h ../../include/proto-lber.h
aclparse.o: ../../include/proto-ldap.h ../../include/ldif.h
init.o: init.c ../../include/portable.h ../../include/avl.h
init.o: ../../include/ldap.h ../../include/lthread.h
detach.o: detach.c
strdup.o: strdup.c
tempnam.o: tempnam.c
repl.o: repl.c ../../include/proto-lber.h ../../include/lthread.h
lock.o: lock.c ../../include/avl.h ../../include/ldap.h ../../include/lthread.h
schema.o: schema.c ../../include/proto-lber.h ../../include/proto-ldap.h
schema.o: ../../include/ldif.h
schemaparse.o: schemaparse.c ../../include/avl.h ../../include/ldap.h
schemaparse.o: ../../include/lthread.h
monitor.o: monitor.c ../../include/avl.h ../../include/ldap.h
monitor.o: ../../include/proto-ldap.h ../../include/ldif.h
configinfo.o: configinfo.c ../../include/avl.h ../../include/ldap.h
configinfo.o: ../../include/lthread.h ../../include/ldapconfig.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY