-SRCS = search.c config.c
-OBJS = search.o config.o
+# $OpenLDAP$
+
+SRCS = search.c config.c init.c
+OBJS = search.lo config.lo init.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-passwd"
-BUILD_SRV = @BUILD_PASSWD@
+BUILD_MOD = @BUILD_PASSWD@
+BUILD_MOD_DYNAMIC = @BUILD_PASSWD_DYNAMIC@
+
+mod_DEFS = -DSLAPD_IMPORT
+MOD_DEFS = $(@BUILD_PASSWD@_DEFS)
+
+shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
+NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
-PROGRAMS= libback-passwd.a
+LIBBASE = back_passwd
XINCPATH = -I.. -I$(srcdir)/..
+XDEFS = $(MODULES_CPPFLAGS)
+
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
-all-local: FORCE
- $(MAKE) $(MFLAGS) libback-passwd.a
-
-libback-passwd.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(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)/Version.c > $@)