]> git.sur5r.net Git - openldap/blob - servers/slurpd/Make-template
Add NO_THREADS fix from tih@nhh.no
[openldap] / servers / slurpd / 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 #       Stand-alone LDAP Update RePlication Daemon makefile
13 #
14 #-----------------------------------------------------------------------------
15 LDAPSRC = ../..
16 HDIR    = $(LDAPSRC)/include
17 LDIR    = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
19
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 \
23                 tsleep.c
24
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 \
28                 tsleep.o
29
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) \
35           $(ALIBS)
36
37 all:    FORCE
38         @if [ -z "$(MAKESLAPD)" ]; then \
39                 echo "uncomment the MAKESLAPD line in Make-common to make slurpd"; \
40                 exit 0; \
41         else \
42                 make slurpd; \
43         fi
44
45 slurpd: version.o
46         $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
47
48 slurpd.pure:    version.o
49         purify $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
50
51 version.c: $(OBJS) $(LDIR)/liblber/liblber.a $(LDIR)/libldap/libldap.a
52         $(RM) $@
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}|" \
57         < Version.c > $@)
58
59 install: $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/slurpd
60
61 $(LDAP_LIBEXECDIR)/slurpd:      slurpd
62         $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(LDAP_LIBEXECDIR)
63
64 lint:   FORCE
65         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
66
67 5lint:  FORCE
68         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
69
70 clean:  FORCE
71         @echo "making clean in `$(PWD)`"
72         $(RM) slurpd *.o core a.out version.c
73
74 depend: FORCE
75         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
76
77 links:
78         @echo "making links in `$(PWD)`"
79         @$(LN) .src/*.[ch] .
80