mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
71 lines
2.2 KiB
Makefile
71 lines
2.2 KiB
Makefile
##
|
|
## Makefile for LDAP tools
|
|
##
|
|
SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c
|
|
OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o
|
|
XLIBS = -llber -lldap
|
|
|
|
LDAP_INCDIR= ../../include
|
|
LDAP_LIBDIR= ../../libraries
|
|
|
|
XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c
|
|
|
|
PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd
|
|
|
|
ldapsearch: ldsversion.o
|
|
$(CC) $(LDFLAGS) -o $@ ldapsearch.o ldsversion.o $(LIBS)
|
|
|
|
ldapmodify: ldmversion.o
|
|
$(CC) $(LDFLAGS) -o $@ ldapmodify.o ldmversion.o $(LIBS)
|
|
|
|
ldapdelete: lddversion.o
|
|
$(CC) $(LDFLAGS) -o $@ ldapdelete.o lddversion.o $(LIBS)
|
|
|
|
ldapmodrdn: ldrversion.o
|
|
$(CC) $(LDFLAGS) -o $@ ldapmodrdn.o ldrversion.o $(LIBS)
|
|
|
|
ldapadd: ldapmodify
|
|
$(RM) $@
|
|
$(LN) ldapmodify ldapadd
|
|
|
|
ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND)
|
|
$(RM) $@
|
|
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
|
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
|
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
|
-e "s|%VERSION%|$${v}|" \
|
|
< $(srcdir)/Versionlds.c > $@)
|
|
|
|
ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND)
|
|
$(RM) $@
|
|
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
|
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
|
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
|
-e "s|%VERSION%|$${v}|" \
|
|
< $(srcdir)/Versionldm.c > $@)
|
|
|
|
lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND)
|
|
$(RM) $@
|
|
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
|
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
|
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
|
-e "s|%VERSION%|$${v}|" \
|
|
< $(srcdir)/Versionldd.c > $@)
|
|
|
|
ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND)
|
|
$(RM) $@
|
|
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
|
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
|
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
|
-e "s|%VERSION%|$${v}|" \
|
|
< $(srcdir)/Versionldr.c > $@)
|
|
|
|
install-local: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE
|
|
-$(MKDIR) -p $(bindir)
|
|
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(bindir)
|
|
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(bindir)
|
|
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(bindir)
|
|
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(bindir)
|
|
$(RM) $(bindir)/ldapadd
|
|
$(LN) $(bindir)/ldapmodify $(bindir)/ldapadd
|