Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / bsd / openldap / dist / build / top.mk
blob7950b5406c00b6ae0043056921535d7f837d1857
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/>.
3 ##
4 ## Copyright 1998-2008 The OpenLDAP Foundation.
5 ## All rights reserved.
6 ##
7 ## Redistribution and use in source and binary forms, with or without
8 ## modification, are permitted only as authorized by the OpenLDAP
9 ## Public License.
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
18 PACKAGE= @PACKAGE@
19 VERSION= @VERSION@
20 RELEASEDATE= @OPENLDAP_RELEASE_DATE@
22 @SET_MAKE@
23 SHELL = /bin/sh
25 top_builddir = @top_builddir@
27 srcdir = @srcdir@
28 top_srcdir = @top_srcdir@
29 VPATH = @srcdir@
30 prefix = @prefix@
31 exec_prefix = @exec_prefix@
32 ldap_subdir = @ldap_subdir@
34 bindir = @bindir@
35 datadir = @datadir@$(ldap_subdir)
36 includedir = @includedir@
37 infodir = @infodir@
38 libdir = @libdir@
39 libexecdir = @libexecdir@
40 localstatedir = @localstatedir@
41 mandir = @mandir@
42 moduledir = @libexecdir@$(ldap_subdir)
43 sbindir = @sbindir@
44 sharedstatedir = @sharedstatedir@
45 sysconfdir = @sysconfdir@$(ldap_subdir)
46 schemadir = $(sysconfdir)/schema
48 PLAT = @PLAT@
49 EXEEXT = @EXEEXT@
50 OBJEXT = @OBJEXT@
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)
61 STRIP = -s
63 LINT = lint
64 5LINT = 5lint
66 MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) \
67 -d "$(srcdir)" -c "$(MKDEP_CC)" -m "$(MKDEP_CFLAGS)"
68 MKDEP_CC = @OL_MKDEP@
69 MKDEP_CFLAGS = @OL_MKDEP_FLAGS@
71 MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)"
73 LIBTOOL = @LIBTOOL@
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)
94 # libtool flags
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
127 AR = @AR@
128 BASENAME = basename
129 CAT = cat
130 CHMOD = chmod
131 DATE = date
132 ECHO = $(SHTOOL) echo
133 HOSTNAME = $(SHTOOL) echo -e "%h%d"
134 LN = $(SHTOOL) mkln
135 LN_H = $(LN)
136 LN_S = $(LN) -s
137 MAKEINFO = @MAKEINFO@
138 MKDIR = $(SHTOOL) mkdir -p
139 MV = $(SHTOOL) move
140 PWD = pwd
141 RANLIB = @RANLIB@
142 RM = rm -f
143 SED = sed
144 SUBST = $(SHTOOL) subst
146 # For manual pages
147 # MANCOMPRESS=@MANCOMPRESS@
148 # MANCOMPRESSSUFFIX=@MANCOMPRESSSUFFIX@
149 MANCOMPRESS=$(CAT)
150 MANCOMPRESSSUFFIX=
152 SOELIM=soelim
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
178 AC_CC = @CC@
179 AC_CFLAGS = @CFLAGS@
180 AC_DEFS = @CPPFLAGS@ # @DEFS@
181 AC_LDFLAGS = @LDFLAGS@
182 AC_LIBS = @LIBS@
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)
204 # Our Defaults
205 CC = $(AC_CC)
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
220 # empty common rules
221 all-common:
222 install-common:
223 clean-common:
224 veryclean-common: clean-common FORCE
225 depend-common:
226 lint-common:
227 lint5-common:
229 # empty local rules
230 all-local:
231 install-local:
232 clean-local:
233 veryclean-local: clean-local FORCE
234 depend-local:
235 lint-local:
236 lint5-local:
238 veryclean: FORCE
239 $(RM) Makefile
240 $(RM) -r .libs
242 Makefile: Makefile.in $(top_srcdir)/build/top.mk
244 pathtest:
245 $(SHTOOL) --version
247 # empty rule for forcing rules
248 FORCE:
250 ##---------------------------------------------------------------------------