-XSRCS = version.c
-SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \
- modify.c modrdn.c compare.c abandon.c result.c
-OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \
- modify.o modrdn.o compare.o abandon.o result.o
+# $OpenLDAP$
+## Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+
+SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c \
+ delete.c modify.c modrdn.c compare.c abandon.c result.c
+OBJS = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo \
+ delete.lo modify.lo modrdn.lo compare.lo abandon.lo result.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-shell"
-BUILD_SRV = @BUILD_SHELL@
+BUILD_MOD = @BUILD_SHELL@
+BUILD_MOD_DYNAMIC = @BUILD_SHELL_DYNAMIC@
+
+mod_DEFS = -DSLAPD_IMPORT
+MOD_DEFS = $(@BUILD_SHELL@_DEFS)
-PROGRAMS = libback-shell.a
+shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
+NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
+
+LIBBASE = back_shell
XINCPATH = -I.. -I$(srcdir)/..
+XDEFS = $(MODULES_CPPFLAGS)
+
+all-local-lib: ../.backend
-all-local: FORCE
- $(MAKE) $(MFLAGS) libback-shell.a
-
-libback-shell.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 > $@)
+../.backend: lib$(LIBBASE).a
+ @touch $@