2 ## Copyright 1998,1999 The OpenLDAP Foundation
3 ## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
4 ## of this package for details.
5 ##---------------------------------------------------------------------------
7 ## Makefile Template for Shared Libraries
10 NT_LTFLAGS = --only-$(LINKAGE)
11 LTFLAGS = $(@PLAT@_LTFLAGS)
13 NT_DYN_LT_NO_UNDEF = -no-undefined
14 LT_NO_UNDEF = $(@PLAT@_@LIB_LINKAGE@_LT_NO_UNDEF)
16 COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(EXTRA_DEFS) -c
17 LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
18 $(LTVERSION) $(LT_NO_UNDEF)
28 # DYN_EXT (@DYN_EXT@) describes the extension assoicated with a
29 # dynamic library, e.g. so, dll
33 $(LIBRARY): version.lo
34 $(LTLIBLINK) -rpath $(libdir) -o $@ $(OBJS) version.lo $(EXTRA_LIBS)
36 (d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
37 $(RM) ../`$(BASENAME) $@ .la`.a; \
38 (d=`$(PWD)`; t=`$(BASENAME) $@ .la`.a; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t)
39 # If we want our binaries to link dynamically with libldap{,_r} liblber...
40 # We also symlink the .so.# so we can run the tests without installing
41 if test "$(LINK_BINS_DYNAMIC)" = "yes"; then \
42 (d=`$(PWD)`; b=`$(BASENAME) $@ .la`; t=`ls $$d/.libs/$$b*.$(DYN_EXT)`; t=`$(BASENAME) $$t`; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t); \
43 if test "$(DYN_EXT)" != dll; then \
44 (d=`$(PWD)`; b=`$(BASENAME) $@ .la`; t=`ls $$d/.libs/$$b.$(DYN_EXT).?`; $(LN_S) `$(BASENAME) $$d`/.libs/`$(BASENAME) $$t` ../`$(BASENAME) $$t`); \
48 Makefile: $(top_srcdir)/build/lib-shared.mk