2 ## Copyright 1998-2002 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
18 # symlinks for libraries: UNIX and Windows (a.k.a. NT) need to be handled
19 # differently. In UNIX, the static and shared libraries, as well as shared
20 # library symlinks, can all be symlinked in the 'libraries' directory. In
21 # Windows, only the static library (.a file) or the shared library (.dll)
22 # file should be present. The current mingw linker (i.e. ld) WILL look
23 # for a .dll file at link time and internally generate an import library
24 # for it. However, ld will not do this if a static library is present.
25 # That doesn't seem very correct, but that's the behavior, like it or not.
27 # Note that there doesn't seem to be a true need for the .la file at
28 # this level, so it is left out.
30 # The set of symlinks are determined by examining the library's .la file.
32 $(LIBRARY): version.lo
33 $(LTLINK_LIB) -o $@ $(OBJS) version.lo $(LINK_LIBS)
34 @d=`$(PWD)`; b=`$(BASENAME) $$d`; \
37 arlib=`grep '^old_library=' $$b/$@`; \
38 arlib=`expr "$$arlib" : "[^']*'\(.*\)'"`; \
40 if test "$(BUILD_LIBS_DYNAMIC)" = "shared"; then \
41 shlibs=`grep '^library_names' $$b/$@`; \
42 shlibs=`expr "$$shlibs" : "[^']*'\(.*\)'"`; \
43 libs="$$libs $$shlibs"; \
48 echo $(LN_S) $$b/.libs/$$i $$i; \
49 $(LN_S) $$b/.libs/$$i $$i; \
52 Makefile: $(top_srcdir)/build/lib-shared.mk