#----------------------------------------------------------------------------- # Copyright (c) 1994 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. # # LDAP library makefile # #----------------------------------------------------------------------------- LDAPSRC = ../.. SRCS = bind.c open.c result.c error.c compare.c search.c \ modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \ getfilter.c regex.c sbind.c kbind.c unbind.c friendly.c cldap.c \ free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \ getdn.c getentry.c getattr.c getvalues.c addentry.c \ request.c getdxbyname.c os-ip.c url.c charset.c OBJS = bind.o open.o result.o error.o compare.o search.o \ modify.o add.o modrdn.o delete.o abandon.o ufn.o cache.o \ getfilter.o regex.o sbind.o kbind.o unbind.o friendly.o cldap.o \ free.o disptmpl.o srchpref.o dsparse.o tmplout.o sort.o \ getdn.o getentry.o getattr.o getvalues.o addentry.o \ request.o getdxbyname.o os-ip.o url.o charset.o HDIR = ../../include INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG) DEFINES = $(DEFS) -DFILTERFILE="\"$(LDAP_ETCDIR)/ldapfilter.conf\"" \ -DTEMPLATEFILE="\"$(LDAP_ETCDIR)/ldaptemplates.conf\"" CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) LIBS = -L. -L../liblber -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) all: libldap.a ltest ttest libldap.a: version.o $(AR) ruv $@ $(OBJS) version.o @if [ ! -z "$(RANLIB)" ]; then \ $(RANLIB) $@; \ fi; \ $(RM) ../$@; \ $(LN) libldap/$@ ../$@ ltest: libldap.a test.o ../liblber/liblber.a $(CC) $(ALDFLAGS) -o $@ test.o $(LIBS) ttest: libldap.a tmpltest.o ../liblber/liblber.a $(CC) $(ALDFLAGS) -o $@ tmpltest.o $(LIBS) version.c: $(OBJS) $(RM) $@ (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ < Version.c > $@) install: libldap.a ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf FORCE -$(MKDIR) -p $(LDAP_LIBDIR) $(LDAP_ETCDIR) $(INSTALL) $(INSTALLFLAGS) -m 644 libldap.a $(LDAP_LIBDIR) @if [ ! -z "$(RANLIB)" ]; then \ (cd /tmp; $(RANLIB) $(LDAP_LIBDIR)/libldap.a) \ fi -$(MKDIR) -p $(LDAP_ETCDIR) -$(MV) $(LDAP_ETCDIR)/ldapfriendly $(LDAP_ETCDIR)/ldapfriendly- $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfriendly $(LDAP_ETCDIR) -$(MV) $(LDAP_ETCDIR)/ldapfilter.conf $(LDAP_ETCDIR)/ldapfilter.conf- $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfilter.conf $(LDAP_ETCDIR) -$(MV) $(LDAP_ETCDIR)/ldaptemplates.conf $(LDAP_ETCDIR)/ldaptemplates.conf- $(INSTALL) $(INSTALLFLAGS) -m 644 ldaptemplates.conf $(LDAP_ETCDIR) -$(MV) $(LDAP_ETCDIR)/ldapsearchprefs.conf $(LDAP_ETCDIR)/ldapsearchprefs.conf- $(INSTALL) $(INSTALLFLAGS) -m 644 ldapsearchprefs.conf $(LDAP_ETCDIR) lint: FORCE $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) 5lint: FORCE $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) clean: FORCE $(RM) libldap.a ../libldap.a ltest ttest *.o core a.out *.log version.c depend: FORCE $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) links: @$(LN) .src/*.[ch] .src/ldapfriendly .src/ldapfilter.conf \ .src/ldaptemplates.conf .src/ldapsearchprefs.conf . # DO NOT DELETE THIS LINE -- mkdep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. bind.o: bind.c ../../include/lber.h ../../include/proto-ldap.h open.o: open.c ../../include/proto-lber.h ../../include/proto-ldap.h result.o: result.c ../../include/portable.h ../../include/proto-lber.h result.o: ../../include/proto-ldap.h error.o: error.c ../../include/lber.h ../../include/proto-ldap.h compare.o: compare.c ../../include/lber.h ../../include/proto-ldap.h search.o: search.c ../../include/lber.h ../../include/proto-ldap.h modify.o: modify.c ../../include/lber.h ../../include/proto-ldap.h add.o: add.c ../../include/lber.h ../../include/proto-ldap.h modrdn.o: modrdn.c ../../include/lber.h ../../include/proto-ldap.h delete.o: delete.c ../../include/lber.h ../../include/proto-ldap.h abandon.o: abandon.c ../../include/lber.h ../../include/proto-ldap.h ufn.o: ufn.c ../../include/lber.h ../../include/proto-ldap.h cache.o: cache.c ../../include/lber.h ../../include/proto-ldap.h getfilter.o: getfilter.c ../../include/lber.h ../../include/proto-ldap.h regex.o: regex.c sbind.o: sbind.c ../../include/lber.h ../../include/proto-ldap.h kbind.o: kbind.c unbind.o: unbind.c ../../include/proto-lber.h ../../include/proto-ldap.h friendly.o: friendly.c ../../include/lber.h ../../include/proto-ldap.h cldap.o: cldap.c free.o: free.c ../../include/ldap.h disptmpl.o: disptmpl.c ../../include/proto-lber.h ../../include/disptmpl.h srchpref.o: srchpref.c ../../include/proto-lber.h ../../include/srchpref.h dsparse.o: dsparse.c ../../include/proto-lber.h tmplout.o: tmplout.c ../../include/proto-lber.h ../../include/proto-ldap.h sort.o: sort.c ../../include/proto-lber.h ../../include/proto-ldap.h getdn.o: getdn.c ../../include/lber.h ../../include/proto-ldap.h getentry.o: getentry.c ../../include/lber.h ../../include/proto-ldap.h getattr.o: getattr.c ../../include/lber.h ../../include/proto-ldap.h getvalues.o: getvalues.c ../../include/lber.h ../../include/proto-ldap.h addentry.o: addentry.c ../../include/lber.h ../../include/proto-ldap.h request.o: request.c ../../include/portable.h ../../include/proto-lber.h request.o: ../../include/proto-ldap.h getdxbyname.o: getdxbyname.c os-ip.o: os-ip.c ../../include/proto-lber.h ../../include/proto-ldap.h url.o: url.c ../../include/lber.h ../../include/proto-ldap.h charset.o: charset.c # IF YOU PUT ANYTHING HERE IT WILL GO AWAY