2 ## Copyright 1998-2000 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) -rpath $(libdir) \
18 $(CFLAGS) $(LDFLAGS) $(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) -o $@ $(OBJS) version.lo $(EXTRA_LIBS)
36 d=`$(PWD)`; d=`$(BASENAME) $$d`; cd ..; $(LN_S) $$d/$@ $@; \
37 t=`$(BASENAME) $@ .la`.a; $(RM) $$t; $(LN_S) $$d/.libs/$$t $$t
38 if test "$(LINK_BINS_DYNAMIC)" = "yes"; then \
39 d=`$(PWD)`; d=`$(BASENAME) $$d`; b=`$(BASENAME) $@ .la`; \
40 cd .libs; t=`echo $$b*.$(DYN_EXT)`; (cd ../.. ; $(RM) $$t; \
41 $(LN_S) $$d/.libs/$$t $$t); \
42 if test "$(DYN_EXT)" != dll; then \
43 t=`echo $$b.$(DYN_EXT).?`; cd ../.. ; \
45 $(LN_S) $$d/.libs/$$t $$t; \
49 Makefile: $(top_srcdir)/build/lib-shared.mk