##
## Makefile for LDAP tools
##
-SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c ldappasswd.c
-OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o ldappasswd.o
+SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c \
+ ldappasswd.c ldapwhoami.c
+OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o \
+ ldappasswd.o ldapwhoami.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
-NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
-CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
-
XLIBS = -llutil -lldif -lldap -llber
XXLIBS = $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
-XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c ldpversion.c
+XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c \
+ ldpversion.c ldwversion.c ldcversion.c
+
+PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd \
+ ldappasswd ldapwhoami ldapcompare
-PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd ldappasswd
ldapsearch: ldsversion.o
$(LTLINK) -o $@ ldapsearch.o ldsversion.o $(LIBS)
ldappasswd: ldpversion.o
$(LTLINK) -o $@ ldappasswd.o ldpversion.o $(LIBS)
+ldapwhoami: ldwversion.o
+ $(LTLINK) -o $@ ldapwhoami.o ldwversion.o $(LIBS)
+
+ldapcompare: ldcversion.o
+ $(LTLINK) -o $@ ldapcompare.o ldcversion.o $(LIBS)
+
ldapadd: ldapmodify
@-$(RM) $@$(EXEEXT)
$(LN_H) ldapmodify$(EXEEXT) ldapadd$(EXEEXT)
+
ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND)
@-$(RM) $@
$(MKVERSION) ldapsearch > $@
@-$(RM) $@
$(MKVERSION) ldapmodrdn > $@
+ldwversion.c: ldapwhoami.o $(LDAP_LIBDEPEND)
+ @-$(RM) $@
+ $(MKVERSION) ldapwhoami > $@
+
+ldcversion.c: ldapcompare.o $(LDAP_LIBDEPEND)
+ @-$(RM) $@
+ $(MKVERSION) ldapcompare > $@
+
+
install-local: FORCE
-$(MKDIR) $(DESTDIR)$(bindir)
@( \