1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1990 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 # LDAP server daemon makefile
14 #-----------------------------------------------------------------------------
16 HDIR = $(LDAPSRC)/include
17 LDIR = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
20 SRCS = main.c detach.c setproctitle.c request.c bind.c result.c error.c \
21 search.c util.c compare.c message.c add.c delete.c modrdn.c modify.c \
22 abandon.c syntax.c association.c kerberos.c certificate.c
23 OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \
24 search.o util.o compare.o message.o add.o delete.o modrdn.o modify.o \
25 abandon.o syntax.o association.o kerberos.o LDAP_tables.o \
28 INCLUDES= -I. -I$(HDIR) $(ISODEINCLUDEFLAG) $(KRBINCLUDEFLAG)
29 DEFINES = $(DEFS) $(SERVERDEFS)
30 CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
31 LDFLAGS = -L$(LDIR) $(ISODELIBFLAG) $(KRBLIBFLAG)
32 LIBS = -llber $(ISODELIBS) $(KRBLIBS) $(ALIBS)
35 @if [ "$(HAVEISODE)" = "yes" ]; then \
36 $(MAKE) $(MFLAGS) CC=$(CC) ldapd; \
38 echo "uncomment the HAVEISODE=yes line in the Make-common file to build ldapd"; \
43 $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
46 $(CC) $(ALDFLAGS) -static -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) -lresolv
48 version.c: $(OBJS) $(LDIR)/liblber/liblber.a
50 (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
51 t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
52 -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
53 -e "s|%VERSION%|$${v}|" \
56 request.o: LDAP-types.h
58 LDAP_tables.c: ldap.py
59 @if [ ! -z "$(PEPSY)" ]; then \
60 $(PEPSY) -A ldap.py; \
62 touch LDAP_tables.c LDAP-types.h; \
65 LDAP-types.h: LDAP_tables.c
68 @if [ "$(HAVEISODE)" = "yes" ]; then \
69 $(MAKE) $(MFLAGS) CC=$(CC) install-ldapd; \
71 echo "uncomment the HAVEISODE=yes line in the Make-common file to build and install ldapd"; \
74 install-ldapd: $(ETCDIR) $(ETCDIR)/ldapd
76 $(ETCDIR)/ldapd: ldapd
77 $(INSTALL) $(INSTALLFLAGS) -m 755 ldapd $(ETCDIR)
80 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
83 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
86 $(RM) ldapd sldapd *.o core a.out version.c LDAP*
89 @if [ ! -z "$(HAVEISODE)" ]; then \
90 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS); \
92 echo "uncomment the HAVEISODE=yes line in the Make-common file to build ldapd"; \
96 @$(LN) .src/*.py .src/*.[ch] .
97 # DO NOT DELETE THIS LINE -- mkdep uses it.
98 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
100 main.o: main.c ../../include/portable.h ../../include/lber.h
101 main.o: ../../include/ldap.h common.h
102 detach.o: detach.c ../../include/portable.h
103 setproctitle.o: setproctitle.c
104 request.o: request.c ../../include/lber.h ../../include/ldap.h common.h
105 bind.o: bind.c ../../include/lber.h ../../include/ldap.h common.h
106 result.o: result.c ../../include/lber.h ../../include/ldap.h common.h
107 error.o: error.c ../../include/lber.h ../../include/ldap.h
108 search.o: search.c ../../include/lber.h ../../include/ldap.h common.h
109 util.o: util.c ../../include/lber.h ../../include/ldap.h common.h
110 compare.o: compare.c ../../include/lber.h ../../include/ldap.h common.h
111 message.o: message.c ../../include/lber.h ../../include/ldap.h common.h
112 add.o: add.c ../../include/lber.h ../../include/ldap.h common.h
113 delete.o: delete.c ../../include/lber.h ../../include/ldap.h common.h
114 modrdn.o: modrdn.c ../../include/lber.h ../../include/ldap.h common.h
115 modify.o: modify.c ../../include/lber.h ../../include/ldap.h common.h
116 abandon.o: abandon.c ../../include/lber.h ../../include/ldap.h common.h
117 syntax.o: syntax.c ../../include/lber.h ../../include/ldap.h common.h
118 association.o: association.c ../../include/lber.h ../../include/ldap.h common.h
119 kerberos.o: kerberos.c ../../include/lber.h ../../include/ldap.h common.h
120 certificate.o: certificate.c ../../include/lber.h ../../include/ldap.h common.h
122 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY