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: $(ETCDIR) $(ETCDIR)/slurpd
61 $(ETCDIR)/slurpd: slurpd
62 $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(ETCDIR)
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)`"
81 # DO NOT DELETE THIS LINE -- mkdep uses it.
82 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
84 admin.o: admin.c ../../include/lber.h ../../include/proto-ldap.h
85 admin.o: ../../include/portable.h ../../include/ldif.h
86 args.o: args.c ../../include/lber.h ../../include/proto-ldap.h
87 args.o: ../../include/lthread.h ../../include/ldapconfig.h
88 ch_malloc.o: ch_malloc.c ../../include/avl.h ../../include/ldap.h
89 ch_malloc.o: ../../include/lthread.h
90 config.o: config.c ../../include/lber.h ../../include/proto-ldap.h
91 config.o: ../../include/lthread.h ../../include/ldapconfig.h
93 fm.o: fm.c ../../include/lber.h ../../include/proto-ldap.h
94 fm.o: ../../include/portable.h ../../include/ldif.h
95 globals.o: globals.c ../../include/lber.h ../../include/proto-ldap.h
96 globals.o: ../../include/portable.h ../../include/ldif.h
97 ldap_op.o: ldap_op.c ../../include/proto-lber.h ../../include/proto-ldap.h
98 ldap_op.o: ../../include/lthread.h ../../include/ldif.h
99 lock.o: lock.c ../../include/portable.h ../../include/avl.h
100 lock.o: ../../include/ldap.h ../../include/lthread.h
101 main.o: main.c ../../include/lber.h ../../include/proto-ldap.h
102 main.o: ../../include/portable.h ../../include/ldif.h
103 re.o: re.c ../slapd/slap.h ../../include/lber.h ../../include/proto-ldap.h
104 re.o: ../../include/ldif.h ../../include/portable.h
105 reject.o: reject.c ../../include/lber.h ../../include/proto-ldap.h
106 reject.o: ../../include/portable.h ../../include/ldif.h
107 replica.o: replica.c ../../include/lber.h ../../include/proto-ldap.h
108 replica.o: ../../include/portable.h ../../include/ldif.h
109 replog.o: replog.c ../../include/portable.h ../../include/proto-lber.h
110 replog.o: ../../include/proto-ldap.h ../../include/ldapconfig.h
111 ri.o: ri.c ../../include/lber.h ../../include/proto-ldap.h
112 ri.o: ../../include/portable.h ../../include/ldif.h
113 rq.o: rq.c ../../include/lber.h ../../include/proto-ldap.h
114 rq.o: ../../include/portable.h ../../include/ldif.h
115 sanity.o: sanity.c ../../include/lber.h ../../include/proto-ldap.h
116 sanity.o: ../../include/portable.h ../../include/ldif.h
117 st.o: st.c ../../include/lber.h ../../include/proto-ldap.h
118 st.o: ../../include/portable.h ../../include/ldif.h
119 tsleep.o: tsleep.c ../../include/lber.h ../../include/proto-ldap.h
120 tsleep.o: ../../include/portable.h ../../include/ldif.h
122 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY