1 # $OpenLDAP: pkg/ldap/build/top.mk,v 1.103.2.5 2008/02/11 23:26:38 kurt Exp $
2 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ## Copyright 1998-2008 The OpenLDAP Foundation.
5 ## All rights reserved.
7 ## Redistribution and use in source and binary forms, with or without
8 ## modification, are permitted only as authorized by the OpenLDAP
11 ## A copy of this license is available in the file LICENSE in the
12 ## top-level directory of the distribution or, alternatively, at
13 ##---------------------------------------------------------------------------
15 # Top-level Makefile template
20 RELEASEDATE
= @OPENLDAP_RELEASE_DATE@
25 top_builddir
= @top_builddir@
28 top_srcdir
= @top_srcdir@
31 exec_prefix = @
exec_prefix@
32 ldap_subdir
= @ldap_subdir@
35 datadir = @
datadir@
$(ldap_subdir
)
36 includedir = @
includedir@
39 libexecdir
= @libexecdir@
40 localstatedir
= @localstatedir@
42 moduledir
= @libexecdir@
$(ldap_subdir
)
44 sharedstatedir
= @sharedstatedir@
45 sysconfdir
= @sysconfdir@
$(ldap_subdir
)
46 schemadir
= $(sysconfdir
)/schema
52 BUILD_LIBS_DYNAMIC
= @BUILD_LIBS_DYNAMIC@
54 SHTOOL
= $(top_srcdir
)/build
/shtool
56 INSTALL
= $(SHTOOL
) install -c
57 INSTALL_PROGRAM
= $(INSTALL
)
58 INSTALL_DATA
= $(INSTALL
) -m
644
59 INSTALL_SCRIPT
= $(INSTALL
)
66 MKDEP
= $(top_srcdir
)/build
/mkdep
$(MKDEPFLAG
) \
67 -d
"$(srcdir)" -c
"$(MKDEP_CC)" -m
"$(MKDEP_CFLAGS)"
69 MKDEP_CFLAGS
= @OL_MKDEP_FLAGS@
71 MKVERSION
= $(top_srcdir
)/build
/mkversion
-v
"$(VERSION)"
74 LIBRELEASE
= @OPENLDAP_LIBRELEASE@
75 LIBVERSION
= @OPENLDAP_LIBVERSION@
76 LTVERSION
= -release
$(LIBRELEASE
) -version-info
$(LIBVERSION
)
78 # libtool --only flag for libraries: platform specific
79 NT_LTONLY_LIB
= # --only-$(BUILD_LIBS_DYNAMIC)
80 LTONLY_LIB
= $(@PLAT@_LTONLY_LIB
)
82 # libtool --only flag for modules: depends on linkage of module
83 # The BUILD_MOD macro is defined in each backend Makefile.in file
84 LTONLY_yes
= --tag
=disable-shared
85 LTONLY_mod
= --tag
=disable-static
86 LTONLY_MOD
= $(LTONLY_
$(BUILD_MOD
))
88 # platform-specific libtool flags
89 NT_LTFLAGS_LIB
= -no-undefined
-avoid-version
-rpath
$(libdir)
90 NT_LTFLAGS_MOD
= -no-undefined
-avoid-version
-rpath
$(moduledir
)
91 UNIX_LTFLAGS_LIB
= $(LTVERSION
) -rpath
$(libdir)
92 UNIX_LTFLAGS_MOD
= $(LTVERSION
) -rpath
$(moduledir
)
95 LTFLAGS
= $(@PLAT@_LTFLAGS
)
96 LTFLAGS_LIB
= $(@PLAT@_LTFLAGS_LIB
)
97 LTFLAGS_MOD
= $(@PLAT@_LTFLAGS_MOD
)
99 # LIB_DEFS defined in liblber and libldap Makefile.in files.
100 # MOD_DEFS defined in backend Makefile.in files.
102 # platform-specific LINK_LIBS defined in various Makefile.in files.
103 # LINK_LIBS referenced in library and module link commands.
104 LINK_LIBS
= $(MOD_LIBS
) $(@PLAT@_LINK_LIBS
)
106 LTSTATIC
= @LTSTATIC@
108 LTLINK
= $(LIBTOOL
) --mode
=link \
109 $(CC
) $(LTSTATIC
) $(LT_CFLAGS
) $(LDFLAGS
) $(LTFLAGS
)
111 LTCOMPILE_LIB
= $(LIBTOOL
) $(LTONLY_LIB
) --mode
=compile \
112 $(CC
) $(LT_CFLAGS
) $(LT_CPPFLAGS
) $(LIB_DEFS
) -c
114 LTLINK_LIB
= $(LIBTOOL
) $(LTONLY_LIB
) --mode
=link \
115 $(CC
) $(LT_CFLAGS
) $(LDFLAGS
) $(LTFLAGS_LIB
)
117 LTCOMPILE_MOD
= $(LIBTOOL
) $(LTONLY_MOD
) --mode
=compile \
118 $(CC
) $(LT_CFLAGS
) $(LT_CPPFLAGS
) $(MOD_DEFS
) -c
120 LTLINK_MOD
= $(LIBTOOL
) $(LTONLY_MOD
) --mode
=link \
121 $(CC
) $(LT_CFLAGS
) $(LDFLAGS
) $(LTFLAGS_MOD
)
123 LTINSTALL
= $(LIBTOOL
) --mode
=install $(INSTALL
)
124 LTFINISH
= $(LIBTOOL
) --mode
=finish
126 # Misc UNIX commands used in build environment
132 ECHO
= $(SHTOOL
) echo
133 HOSTNAME
= $(SHTOOL
) echo
-e
"%h%d"
137 MAKEINFO
= @MAKEINFO@
138 MKDIR
= $(SHTOOL
) mkdir
-p
144 SUBST
= $(SHTOOL
) subst
147 # MANCOMPRESS=@MANCOMPRESS@
148 # MANCOMPRESSSUFFIX=@MANCOMPRESSSUFFIX@
154 INCLUDEDIR
= $(top_srcdir
)/include
155 LDAP_INCPATH
= -I
$(LDAP_INCDIR
) -I
$(INCLUDEDIR
)
156 LDAP_LIBDIR
= $(top_builddir
)/libraries
158 LUTIL_LIBS
= @LUTIL_LIBS@
159 LTHREAD_LIBS
= @LTHREAD_LIBS@
161 BDB_LIBS
= @BDB_LIBS@
163 LDAP_LIBLBER_LA
= $(LDAP_LIBDIR
)/liblber
/liblber.la
164 LDAP_LIBLDAP_LA
= $(LDAP_LIBDIR
)/libldap
/libldap.la
165 LDAP_LIBLDAP_R_LA
= $(LDAP_LIBDIR
)/libldap_r
/libldap_r.la
167 LDAP_LIBREWRITE_A
= $(LDAP_LIBDIR
)/librewrite
/librewrite.a
168 LDAP_LIBLUNICODE_A
= $(LDAP_LIBDIR
)/liblunicode
/liblunicode.a
169 LDAP_LIBLUTIL_A
= $(LDAP_LIBDIR
)/liblutil
/liblutil.a
171 LDAP_L
= $(LDAP_LIBLUTIL_A
) \
172 $(LDAP_LIBLDAP_LA
) $(LDAP_LIBLBER_LA
)
173 SLAPD_L
= $(LDAP_LIBLUNICODE_A
) $(LDAP_LIBREWRITE_A
) \
174 $(LDAP_LIBLUTIL_A
) $(LDAP_LIBLDAP_R_LA
) $(LDAP_LIBLBER_LA
)
176 WRAP_LIBS
= @WRAP_LIBS@
177 # AutoConfig generated
180 AC_DEFS
= @CPPFLAGS@
# @DEFS@
181 AC_LDFLAGS
= @LDFLAGS@
184 KRB4_LIBS
= @KRB4_LIBS@
185 KRB5_LIBS
= @KRB5_LIBS@
186 KRB_LIBS
= @KRB4_LIBS@ @KRB5_LIBS@
187 SASL_LIBS
= @SASL_LIBS@
188 TLS_LIBS
= @TLS_LIBS@
189 AUTH_LIBS
= @AUTH_LIBS@
190 SECURITY_LIBS
= $(SASL_LIBS
) $(KRB_LIBS
) $(TLS_LIBS
) $(AUTH_LIBS
)
191 ICU_LIBS
= @ICU_LIBS@
193 MODULES_CPPFLAGS
= @SLAPD_MODULES_CPPFLAGS@
194 MODULES_LDFLAGS
= @SLAPD_MODULES_LDFLAGS@
195 MODULES_LIBS
= @MODULES_LIBS@
196 SLAPD_PERL_LDFLAGS
= @SLAPD_PERL_LDFLAGS@
198 SLAPD_SQL_LDFLAGS
= @SLAPD_SQL_LDFLAGS@
199 SLAPD_SQL_INCLUDES
= @SLAPD_SQL_INCLUDES@
200 SLAPD_SQL_LIBS
= @SLAPD_SQL_LIBS@
202 SLAPD_LIBS
= @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@ @SLAPD_GMP_LIBS@
$(ICU_LIBS
)
206 DEFS
= $(LDAP_INCPATH
) $(XINCPATH
) $(XDEFS
) $(AC_DEFS
) $(DEFINES
)
207 CFLAGS
= $(AC_CFLAGS
) $(DEFS
)
208 LDFLAGS
= $(LDAP_LIBPATH
) $(AC_LDFLAGS
) $(XLDFLAGS
)
209 LIBS
= $(XLIBS
) $(XXLIBS
) $(AC_LIBS
) $(XXXLIBS
)
211 LT_CFLAGS
= $(AC_CFLAGS
)
212 LT_CPPFLAGS
= $(DEFS
)
214 all: all-common all-local FORCE
215 install: install-common install-local FORCE
216 clean: clean-common clean-local FORCE
217 veryclean
: veryclean-common veryclean-local FORCE
218 depend
: depend-common depend-local FORCE
224 veryclean-common
: clean-common FORCE
233 veryclean-local
: clean-local FORCE
242 Makefile
: Makefile.in
$(top_srcdir
)/build
/top.mk
247 # empty rule for forcing rules
250 ##---------------------------------------------------------------------------