Commit b78a4a34 authored by Howard Chu's avatar Howard Chu
Browse files

Preliminary Make rules to allow building backends as modules.

parent 03b58cc9
......@@ -179,6 +179,16 @@ do
--mode) prevopt="--mode" prev=mode ;;
--mode=*) mode="$optarg" ;;
--only-shared)
build_libtool_libs=yes
build_old_libs=no
;;
--only-static)
build_libtool_libs=no
build_old_libs=yes
;;
--quiet | --silent)
show=:
;;
......
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Server Modules
##
LIBRARY = lib$(LIBBASE).la
LIBSTAT = lib$(LIBBASE).a
MODULE = $(LIBBASE).so
all-common: FORCE
@if test "$(BUILD_MOD)" = "yes"; then \
$(MAKE) $(MFLAGS) LTFLAGS=--only-shared all-mod; \
elif test "$(BUILD_LIB)" = "yes" ; then \
$(MAKE) $(MFLAGS) LTFLAGS=--only-static all-lib; \
else \
echo "run configure with $(BUILD_OPT) to build $(LIBBASE)"; \
fi
version.c: $(OBJS)
$(RM) $@
$(MKVERSION) $(LIBBASE) > $@
$(LIBRARY): version.lo
$(LTLIBLINK) -rpath $(libdir) -o $@ $(OBJS) version.lo
$(MODULE): $(LIBRARY)
ln .libs/lib$(LIBBASE).so.0.0.0 $@
$(LIBSTAT): version.lo
$(AR) ruv $@ `echo $(OBJS) | sed s/\.lo/.o/g` version.o
@$(RANLIB) $@
clean-common: clean-lib FORCE
veryclean-common: veryclean-lib FORCE
lint-common: FORCE
@if test "$(BUILD_LIB)" = "yes" ; then \
$(MAKE) $(MFLAGS) lint-lib; \
else \
echo "run configure with $(BUILD_OPT) to lint $(LIBBASE)"; \
fi
5lint-common: FORCE
@if test "$(BUILD_LIB)" = "yes" ; then \
$(MAKE) $(MFLAGS) 5lint-lib; \
else \
echo "run configure with $(BUILD_OPT) to 5lint $(LIBBASE)"; \
fi
depend-common: FORCE
@if test "$(BUILD_LIB)" = "yes" ; then \
$(MAKE) $(MFLAGS) depend-lib; \
else \
echo "run configure with $(BUILD_OPT) to depend $(LIBBASE)"; \
fi
install-common: FORCE
@if test "$(BUILD_LIB)" = "yes" ; then \
$(MAKE) $(MFLAGS) install-lib; \
else \
echo "run configure with $(BUILD_OPT) to install $(LIBBASE)"; \
fi
all-local-mod:
all-mod: $(MODULE) all-local-mod FORCE
all-local-lib:
all-lib: $(LIBSTAT) all-local-lib FORCE
install-local-lib:
install-lib: install-local-lib FORCE
lint-local-lib:
lint-lib: lint-local-lib FORCE
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
5lint-local-lib:
5lint-lib: 5lint-local-lib FORCE
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
clean-local-lib:
clean-lib: clean-local-lib FORCE
$(RM) $(LIBRARY) $(LIBSTAT) $(MODULE) *.o *.lo a.out core .libs/*
depend-local-lib:
depend-lib: depend-local-lib FORCE
COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) -c
MKDEPFLAG = -l
.SUFFIXES: .c .o .lo
.c.lo:
$(COMPILE) $<
Makefile: $(top_srcdir)/build/mod.mk
......@@ -13054,7 +13054,7 @@ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
......@@ -13256,7 +13256,7 @@ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
......
......@@ -2107,7 +2107,7 @@ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
......
XSRCS = version.c
SRCS = init.c config.c search.c bind.c unbind.c add.c compare.c delete.c \
modify.c modrdn.c
OBJS = init.o config.o search.o bind.o unbind.o add.o compare.o delete.o \
modify.o modrdn.o
SRCS = init.c config.c search.c bind.c unbind.c add.c compare.c \
delete.c modify.c modrdn.c
OBJS = init.lo config.lo search.lo bind.lo unbind.lo add.lo compare.lo \
delete.lo modify.lo modrdn.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-ldap"
BUILD_SRV = @BUILD_LDAP@
BUILD_LIB = @BUILD_LDAP@
BUILD_MOD = @BUILD_LDAP_DYNAMIC@
PROGRAMS = libback-ldap.a
LIBBASE = back-ldap
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
all-local-srv: FORCE
$(MAKE) $(MFLAGS) libback-ldap.a
all-lib-local: ../.backend
libback-ldap.a: version.o
$(AR) ruv $@ $(OBJS) version.o
@$(RANLIB) $@
../.backend: $(LIBSTAT)
@touch ../.backend
version.c: $(OBJS) $(LDAP_LIBDEPEND)
@-$(RM) $@
$(MKVERSION) back-ldap > $@
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment