1999-08-30 16:08:00 +08:00
|
|
|
# $OpenLDAP$
|
2000-05-13 10:36:07 +08:00
|
|
|
## Copyright 1998-2000 The OpenLDAP Foundation
|
1998-12-29 03:58:57 +08:00
|
|
|
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
|
|
|
## of this package for details.
|
1998-11-22 12:22:28 +08:00
|
|
|
##---------------------------------------------------------------------------
|
|
|
|
##
|
|
|
|
## Makefile Template for Shared Libraries
|
|
|
|
##
|
|
|
|
|
1999-10-28 15:31:59 +08:00
|
|
|
NT_LTFLAGS = --only-$(LINKAGE)
|
|
|
|
LTFLAGS = $(@PLAT@_LTFLAGS)
|
|
|
|
|
|
|
|
NT_DYN_LT_NO_UNDEF = -no-undefined
|
|
|
|
LT_NO_UNDEF = $(@PLAT@_@LIB_LINKAGE@_LT_NO_UNDEF)
|
|
|
|
|
|
|
|
COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(EXTRA_DEFS) -c
|
|
|
|
LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
|
|
|
|
$(LTVERSION) $(LT_NO_UNDEF)
|
|
|
|
|
1998-11-22 12:22:28 +08:00
|
|
|
MKDEPFLAG = -l
|
|
|
|
|
|
|
|
.SUFFIXES: .c .o .lo
|
|
|
|
|
|
|
|
.c.lo:
|
|
|
|
$(COMPILE) $<
|
|
|
|
|
1999-10-28 15:31:59 +08:00
|
|
|
|
|
|
|
# DYN_EXT (@DYN_EXT@) describes the extension assoicated with a
|
|
|
|
# dynamic library, e.g. so, dll
|
|
|
|
|
|
|
|
DYN_EXT=@DYN_EXT@
|
|
|
|
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LIBRARY): version.lo
|
1999-10-28 15:31:59 +08:00
|
|
|
$(LTLIBLINK) -rpath $(libdir) -o $@ $(OBJS) version.lo $(EXTRA_LIBS)
|
|
|
|
$(RM) ../$@
|
2000-05-11 00:10:11 +08:00
|
|
|
d=`$(PWD)`; d=`$(BASENAME) $$d`; cd ..; $(LN_S) $$d/$@ $@; \
|
|
|
|
t=`$(BASENAME) $@ .la`.a; $(RM) $$t; $(LN_S) $$d/.libs/$$t $$t
|
|
|
|
@# If we want our binaries to link dynamically with libldap{,_r} liblber
|
|
|
|
@# We also symlink the .so, so we can run the tests without installing
|
1999-09-29 08:56:43 +08:00
|
|
|
if test "$(LINK_BINS_DYNAMIC)" = "yes"; then \
|
2000-05-11 00:10:11 +08:00
|
|
|
d=`$(PWD)`; d=`$(BASENAME) $$d`; b=`$(BASENAME) $@ .la`; \
|
|
|
|
cd .libs; t=`echo $$b*.$(DYN_EXT)`; (cd ../.. ; $(RM) $$t; \
|
|
|
|
$(LN_S) $$d/.libs/$$t $$t); \
|
1999-10-28 15:31:59 +08:00
|
|
|
if test "$(DYN_EXT)" != dll; then \
|
2000-05-11 00:10:11 +08:00
|
|
|
t=`echo $$b.$(DYN_EXT).?`; cd ../.. ; \
|
|
|
|
$(RM) $$t; \
|
|
|
|
$(LN_S) $$d/.libs/$$t $$t; \
|
1999-10-28 15:31:59 +08:00
|
|
|
fi \
|
1999-09-29 08:56:43 +08:00
|
|
|
fi
|
1998-11-22 12:22:28 +08:00
|
|
|
|
|
|
|
Makefile: $(top_srcdir)/build/lib-shared.mk
|
1999-10-28 15:31:59 +08:00
|
|
|
|