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 # Stand-alone LDAP Update RePlication Daemon makefile
14 #-----------------------------------------------------------------------------
16 HDIR = $(LDAPSRC)/include
17 LDIR = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
20 SRCS = admin.c args.c ch_malloc.c config.c detach.c \
21 fm.c globals.c ldap_op.c lock.c main.c re.c \
22 reject.c replica.c replog.c ri.c rq.c sanity.c st.c \
25 OBJS = admin.o args.o ch_malloc.o config.o detach.o \
26 fm.o globals.o ldap_op.o lock.o main.o re.o \
27 reject.o replica.o replog.o ri.o rq.o sanity.o st.o \
30 INCLUDES= -I. -I$(HDIR) $(KRBINCLUDEFLAG)
31 DEFINES = $(DEFS) $(SERVERDEFS)
32 CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) $(THREADS)
33 LDFLAGS = -L$(LDIR) $(KRBLIBFLAG)
34 LIBS = -lldap -llber -lm -llthread -lldif $(THREADSLIB) $(KRBLIBS) \
38 @if [ -z "$(MAKESLAPD)" ]; then \
39 echo "uncomment the MAKESLAPD line in Make-common to make slurpd"; \
46 $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
48 slurpd.pure: version.o
49 purify $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
51 version.c: $(OBJS) $(LDIR)/liblber/liblber.a $(LDIR)/libldap/libldap.a
53 (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
54 t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
55 -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
56 -e "s|%VERSION%|$${v}|" \
59 install: $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/slurpd
61 $(LDAP_LIBEXECDIR)/slurpd: slurpd
62 $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(LDAP_LIBEXECDIR)
65 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
68 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
71 @echo "making clean in `$(PWD)`"
72 $(RM) slurpd *.o core a.out version.c
75 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
78 @echo "making links in `$(PWD)`"