]> git.ipfire.org Git - thirdparty/openssl.git/blob - Makefile.shared
Don't auto-instantiate a DRBG when trying to use it and it's not
[thirdparty/openssl.git] / Makefile.shared
1 #
2 # Helper makefile to link shared libraries in a portable way.
3 # This is much simpler than libtool, and hopefully not too error-prone.
4 #
5 # The following variables need to be set on the command line to build
6 # properly
7
8 # CC contains the current compiler. This one MUST be defined
9 CC=cc
10 CFLAGS=$(CFLAG)
11 # LDFLAGS contains flags to be used when temporary object files (when building
12 # shared libraries) are created, or when an application is linked.
13 # SHARED_LDFLAGS contains flags to be used when the shared library is created.
14 LDFLAGS=$(LDFLAG)
15 SHARED_LDFLAGS=$(SHARED_LDFLAG)
16
17 RC=windres
18 # SHARED_RCFLAGS are flags used with windres, i.e. when build for Cygwin
19 # or Mingw.
20 SHARED_RCFLAGS=$(SHARED_RCFLAG)
21
22 NM=nm
23 ECHO=echo
24
25 # LIBNAME contains just the name of the library, without prefix ("lib"
26 # on Unix, "cyg" for certain forms under Cygwin...) or suffix (.a, .so,
27 # .dll, ...). This one MUST have a value when using this makefile to
28 # build shared libraries.
29 # For example, to build libfoo.so, you need to do the following:
30 #LIBNAME=foo
31 LIBNAME=
32
33 # STLIBNAME contains the path of the static library to build the shared
34 # library from, for example:
35 #STLIBNAME=libfoo.a
36 STLIBNAME=
37
38 # On most Unix platforms, SHLIBNAME contains the path of the short name of
39 # the shared library to build, for example
40 #SHLIBNAME=libfoo.so
41 # On Windows POSIX layers (cygwin and mingw), SHLIBNAME contains the import
42 # library name for the shared library to be built, for example:
43 #SHLIBNAME=libfoo.dll.a
44
45 # SHLIBNAME_FULL contains the path of the full name of the shared library to
46 # build, for example:
47 #SHLIBNAME_FULL=libfoo.so.1.2
48 # When building DSOs, SHLIBNAME_FULL contains path of the full DSO name, for
49 # example:
50 #SHLIBNAME_FULL=dir/dso.so
51 SHLIBNAME_FULL=
52
53 # SHLIBVERSION contains the current version of the shared library (not to
54 # be confused with the project version)
55 #SHLIBVERSION=1.2
56 SHLIBVERSION=
57
58 # NOTE: to build shared libraries, LIBNAME, STLIBNAME, SHLIBNAME and
59 # SHLIBNAME_FULL MUST have values when using this makefile, and in some
60 # cases, SHLIBVERSION as well. To build DSOs, SHLIBNAME_FULL MUST have
61 # a value, the rest can be left alone.
62
63
64 # APPNAME contains just the name of the application, without suffix (""
65 # on Unix, ".exe" on Windows, ...). This one MUST have a value when using
66 # this makefile to build applications.
67 # For example, to build foo, you need to do the following:
68 #APPNAME=foo
69 APPNAME=
70
71 # SRCDIR is the top directory of the source tree.
72 SRCDIR=.
73
74 # OBJECTS contains all the object files to link together into the application.
75 # This must contain at least one object file.
76 #OBJECTS=foo.o
77 OBJECTS=
78
79 # LIBEXTRAS contains extra modules to link together with the library.
80 # For example, if a second library, say libbar.a needs to be linked into
81 # libfoo.so, you need to do the following:
82 #LIBEXTRAS=libbar.a
83 # Note that this MUST be used when using the link_dso targets, to hold the
84 # names of all object files that go into the target shared object.
85 LIBEXTRAS=
86
87 # LIBDEPS contains all the flags necessary to cover all necessary
88 # dependencies to other libraries.
89 LIBDEPS=
90
91 #------------------------------------------------------------------------------
92 # The rest is private to this makefile.
93
94 SET_X=:
95 #SET_X=set -x
96
97 top:
98 echo "Trying to use this makefile interactively? Don't." ; exit 1
99
100 LINK_APP= \
101 ( $(SET_X); \
102 LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
103 LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS) $(LDFLAGS)}"; \
104 LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
105 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
106 $(ECHO) LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
107 $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS}; \
108 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
109 $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
110
111 LINK_SO= \
112 ( $(SET_X); \
113 LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
114 SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
115 SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
116 LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
117 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
118 $(ECHO) LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
119 $${SHAREDCMD} $${SHAREDFLAGS} \
120 -o $(SHLIBNAME_FULL) \
121 $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS; \
122 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
123 $${SHAREDCMD} $${SHAREDFLAGS} \
124 -o $(SHLIBNAME_FULL) \
125 $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
126 ) && $(SYMLINK_SO)
127
128 SYMLINK_SO= \
129 if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
130 if [ -n "$(SHLIBNAME_FULL)" -a -n "$(SHLIBNAME)" -a \
131 "$(SHLIBNAME_FULL)" != "$(SHLIBNAME)" ]; then \
132 ( $(SET_X); \
133 rm -f $(SHLIBNAME); \
134 ln -s $(SHLIBNAME_FULL) $(SHLIBNAME) ); \
135 fi; \
136 fi
137
138 LINK_SO_SHLIB= SHOBJECTS="$(STLIBNAME) $(LIBEXTRAS)"; $(LINK_SO)
139 LINK_SO_DSO= INHIBIT_SYMLINKS=yes; SHOBJECTS="$(LIBEXTRAS)"; $(LINK_SO)
140
141 LINK_SO_SHLIB_VIA_O= \
142 SHOBJECTS=$(STLIBNAME).o; \
143 ALL=$$ALLSYMSFLAGS; ALLSYMSFLAGS=; NOALLSYMSFLAGS=; \
144 ( $(ECHO) ld $(LDFLAGS) -r -o $$SHOBJECTS $$ALL $(STLIBNAME) $(LIBEXTRAS); \
145 ld $(LDFLAGS) -r -o $$SHOBJECTS $$ALL $(STLIBNAME) $(LIBEXTRAS) ); \
146 $(LINK_SO) && ( $(ECHO) rm -f $$SHOBJECTS; rm -f $$SHOBJECTS )
147
148 LINK_SO_SHLIB_UNPACKED= \
149 UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
150 (cd $$UNPACKDIR; ar x ../$(STLIBNAME)) && \
151 ([ -z "$(LIBEXTRAS)" ] || cp $(LIBEXTRAS) $$UNPACKDIR) && \
152 SHOBJECTS=$$UNPACKDIR/*.o; \
153 $(LINK_SO) && rm -rf $$UNPACKDIR
154
155 DETECT_GNU_LD=($(CC) -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
156
157 DO_GNU_SO_COMMON=\
158 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$(SHLIBNAME_FULL)"
159 DO_GNU_DSO=\
160 $(DO_GNU_SO_COMMON)
161 DO_GNU_SO=\
162 ALLSYMSFLAGS='-Wl,--whole-archive'; \
163 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
164 $(DO_GNU_SO_COMMON)
165 DO_GNU_APP=LDFLAGS="$(CFLAGS) $(LDFLAGS)"
166
167 #This is rather special. It's a special target with which one can link
168 #applications without bothering with any features that have anything to
169 #do with shared libraries, for example when linking against static
170 #libraries. It's mostly here to avoid a lot of conditionals everywhere
171 #else...
172 link_app.:
173 $(LINK_APP)
174
175 link_dso.gnu:
176 @ $(DO_GNU_DSO); $(LINK_SO_DSO)
177 link_shlib.gnu:
178 @ $(DO_GNU_SO); $(LINK_SO_SHLIB)
179 link_app.gnu:
180 @ $(DO_GNU_APP); $(LINK_APP)
181
182 link_shlib.linux-shared:
183 @$(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
184 $(DO_GNU_SO); \
185 ALLSYMSFLAGS='-Wl,--whole-archive,--version-script=$(LIBNAME).map'; \
186 $(LINK_SO_SHLIB)
187
188 link_dso.bsd:
189 @if $(DETECT_GNU_LD); then $(DO_GNU_DSO); else \
190 LIBDEPS=" "; \
191 ALLSYMSFLAGS=; \
192 NOALLSYMSFLAGS=; \
193 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -nostdlib"; \
194 fi; $(LINK_SO_DSO)
195 link_shlib.bsd:
196 @if $(DETECT_GNU_LD); then $(DO_GNU_SO); else \
197 LIBDEPS=" "; \
198 ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
199 NOALLSYMSFLAGS=; \
200 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -nostdlib"; \
201 fi; $(LINK_SO_SHLIB)
202 link_app.bsd:
203 @if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
204 LDFLAGS="$(CFLAGS) $(LDFLAGS)"; \
205 fi; $(LINK_APP)
206
207 # For Darwin AKA Mac OS/X (dyld)
208 # Originally link_dso.darwin produced .so, because it was hard-coded
209 # in dso_dlfcn module. At later point dso_dlfcn switched to .dylib
210 # extension in order to allow for run-time linking with vendor-
211 # supplied shared libraries such as libz, so that link_dso.darwin had
212 # to be harmonized with it. This caused minor controversy, because
213 # it was believed that dlopen can't be used to dynamically load
214 # .dylib-s, only so called bundle modules (ones linked with -bundle
215 # flag). The belief seems to be originating from pre-10.4 release,
216 # where dlfcn functionality was emulated by dlcompat add-on. In
217 # 10.4 dlopen was rewritten as native part of dyld and is documented
218 # to be capable of loading both dynamic libraries and bundles. In
219 # order to provide compatibility with pre-10.4 dlopen, modules are
220 # linked with -bundle flag, which makes .dylib extension misleading.
221 # It works, because dlopen is [and always was] extension-agnostic.
222 # Alternative to this heuristic approach is to develop specific
223 # MacOS X dso module relying on whichever "native" dyld interface.
224 link_dso.darwin:
225 @ ALLSYMSFLAGS=''; \
226 NOALLSYMSFLAGS=''; \
227 SHAREDFLAGS="$(CFLAGS) `echo $(SHARED_LDFLAGS) | sed s/dynamiclib/bundle/`"; \
228 $(LINK_SO_DSO)
229 link_shlib.darwin:
230 @ ALLSYMSFLAGS='-all_load'; \
231 NOALLSYMSFLAGS=''; \
232 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -current_version $(SHLIBVERSION) -compatibility_version $(SHLIBVERSION) -install_name $(INSTALLTOP)/$(LIBDIR)/$(SHLIBNAME_FULL)"; \
233 $(LINK_SO_SHLIB)
234 link_app.darwin: # is there run-path on darwin?
235 $(LINK_APP)
236
237 link_dso.cygwin:
238 @ALLSYMSFLAGS=''; \
239 NOALLSYMSFLAGS=''; \
240 base=-Wl,--enable-auto-image-base; \
241 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic"; \
242 $(LINK_SO_DSO)
243 link_shlib.cygwin:
244 @ INHIBIT_SYMLINKS=yes; \
245 $(ECHO) "$(PERL) $(SRCDIR)/util/mkrc.pl $(SHLIBNAME_FULL) |" \
246 "$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
247 $(PERL) $(SRCDIR)/util/mkrc.pl $(SHLIBNAME_FULL) | \
248 $(RC) $(SHARED_RCFLAGS) -o rc.o; \
249 ALLSYMSFLAGS='-Wl,--whole-archive'; \
250 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
251 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,--enable-auto-image-base -Wl,-Bsymbolic -Wl,--out-implib,$(SHLIBNAME) rc.o"; \
252 $(LINK_SO_SHLIB) || exit 1; \
253 rm rc.o
254 link_app.cygwin:
255 $(LINK_APP)
256
257 # link_dso.mingw-shared and link_app.mingw-shared are mapped to the
258 # corresponding cygwin targets, as they do the exact same thing.
259 link_shlib.mingw:
260 @ INHIBIT_SYMLINKS=yes; \
261 $(PERL) $(SRCDIR)/util/mkdef.pl 32 $(LIBNAME) \
262 | sed -e 's|^\(LIBRARY *\)$(LIBNAME)32|\1$(SHLIBNAME_FULL)|' \
263 > $(LIBNAME).def; \
264 echo "$(PERL) $(SRCDIR)/util/mkrc.pl $(SHLIBNAME_FULL) |" \
265 "$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
266 $(PERL) $(SRCDIR)/util/mkrc.pl $(SHLIBNAME_FULL) | \
267 $(RC) $(SHARED_RCFLAGS) -o rc.o; \
268 ALLSYMSFLAGS='-Wl,--whole-archive'; \
269 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
270 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--out-implib,$(SHLIBNAME) $(LIBNAME).def rc.o"; \
271 $(LINK_SO_SHLIB) || exit 1; \
272 rm $(LIBNAME).def rc.o
273
274 link_dso.alpha-osf1:
275 @ if $(DETECT_GNU_LD); then \
276 $(DO_GNU_DSO); \
277 else \
278 ALLSYMSFLAGS=''; \
279 NOALLSYMSFLAGS=''; \
280 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
281 fi; \
282 $(LINK_SO_DSO)
283 link_shlib.alpha-osf1:
284 @ if $(DETECT_GNU_LD); then \
285 $(DO_GNU_SO); \
286 else \
287 ALLSYMSFLAGS='-all'; \
288 NOALLSYMSFLAGS='-none'; \
289 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic -set_version $(SHLIBVERSION)"; \
290 fi; \
291 $(LINK_SO_SHLIB)
292 link_app.alpha-osf1:
293 @if $(DETECT_GNU_LD); then \
294 $(DO_GNU_APP); \
295 else \
296 LDFLAGS="$(CFLAGS) $(LDFLAGS)"; \
297 fi; \
298 $(LINK_APP)
299
300 link_dso.solaris:
301 @ if $(DETECT_GNU_LD); then \
302 $(DO_GNU_DSO); \
303 else \
304 ALLSYMSFLAGS=""; \
305 NOALLSYMSFLAGS=""; \
306 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $(SHLIBNAME_FULL) -Wl,-Bsymbolic"; \
307 fi; \
308 $(LINK_SO_DSO)
309 link_shlib.solaris:
310 @ if $(DETECT_GNU_LD); then \
311 $(DO_GNU_SO); \
312 else \
313 $(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
314 ALLSYMSFLAGS="-Wl,-z,allextract,-M,$(LIBNAME).map"; \
315 NOALLSYMSFLAGS="-Wl,-z,defaultextract"; \
316 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $(SHLIBNAME_FULL) -Wl,-Bsymbolic"; \
317 fi; \
318 $(LINK_SO_SHLIB)
319 link_app.solaris:
320 @ if $(DETECT_GNU_LD); then \
321 $(DO_GNU_APP); \
322 else \
323 LDFLAGS="$(CFLAGS) $(LDFLAGS)"; \
324 fi; \
325 $(LINK_APP)
326
327 # OpenServer 5 native compilers used
328 link_dso.svr3:
329 @ if $(DETECT_GNU_LD); then \
330 $(DO_GNU_DSO); \
331 else \
332 ALLSYMSFLAGS=''; \
333 NOALLSYMSFLAGS=''; \
334 SHAREDFLAGS="$(CFLAGS) -G -h $(SHLIBNAME_FULL)"; \
335 fi; \
336 $(LINK_SO_DSO)
337 link_shlib.svr3:
338 @ if $(DETECT_GNU_LD); then \
339 $(DO_GNU_SO); \
340 else \
341 ALLSYMSFLAGS=''; \
342 NOALLSYMSFLAGS=''; \
343 SHAREDFLAGS="$(CFLAGS) -G -h $(SHLIBNAME_FULL)"; \
344 fi; \
345 $(LINK_SO_SHLIB_UNPACKED)
346 link_app.svr3:
347 @$(DETECT_GNU_LD) && $(DO_GNU_APP); \
348 $(LINK_APP)
349
350 # UnixWare 7 and OpenUNIX 8 native compilers used
351 link_dso.svr5:
352 @ if $(DETECT_GNU_LD); then \
353 $(DO_GNU_DSO); \
354 else \
355 SHARE_FLAG='-G'; \
356 ($(CC) -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
357 ALLSYMSFLAGS=''; \
358 NOALLSYMSFLAGS=''; \
359 SHAREDFLAGS="$(CFLAGS) $${SHARE_FLAG} -h $(SHLIBNAME_FULL)"; \
360 fi; \
361 $(LINK_SO_DSO)
362 link_shlib.svr5:
363 @ if $(DETECT_GNU_LD); then \
364 $(DO_GNU_SO); \
365 else \
366 SHARE_FLAG='-G'; \
367 ($(CC) -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
368 ALLSYMSFLAGS=''; \
369 NOALLSYMSFLAGS=''; \
370 SHAREDFLAGS="$(CFLAGS) $${SHARE_FLAG} -h $(SHLIBNAME_FULL)"; \
371 fi; \
372 $(LINK_SO_SHLIB_UNPACKED)
373 link_app.svr5:
374 @$(DETECT_GNU_LD) && $(DO_GNU_APP); \
375 $(LINK_APP)
376
377 link_dso.irix:
378 @ if $(DETECT_GNU_LD); then \
379 $(DO_GNU_DSO); \
380 else \
381 ALLSYMSFLAGS=""; \
382 NOALLSYMSFLAGS=""; \
383 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$(SHLIBNAME_FULL),-B,symbolic"; \
384 fi; \
385 $(LINK_SO_DSO)
386 link_shlib.irix:
387 @ if $(DETECT_GNU_LD); then \
388 $(DO_GNU_SO); \
389 else \
390 MINUSWL=""; \
391 ($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
392 ALLSYMSFLAGS="$${MINUSWL}-all"; \
393 NOALLSYMSFLAGS="$${MINUSWL}-none"; \
394 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$(SHLIBNAME_FULL),-B,symbolic"; \
395 fi; \
396 $(LINK_SO_SHLIB)
397 link_app.irix:
398 @LDFLAGS="$(CFLAGS) $(LDFLAGS)"; \
399 $(LINK_APP)
400
401 # 32-bit PA-RISC HP-UX embeds the -L pathname of libs we link with, so
402 # we compensate for it with +cdp ../: and +cdp ./:. Yes, these rewrite
403 # rules imply that we can only link one level down in catalog structure,
404 # but that's what takes place for the moment of this writing. +cdp option
405 # was introduced in HP-UX 11.x and applies in 32-bit PA-RISC link
406 # editor context only [it's simply ignored in other cases, which are all
407 # ELFs by the way].
408 #
409 link_dso.hpux:
410 @if $(DETECT_GNU_LD); then $(DO_GNU_DSO); else \
411 ALLSYMSFLAGS=''; \
412 NOALLSYMSFLAGS=''; \
413 expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
414 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$(SHLIBNAME_FULL),+cdp,../:,+cdp,./:"; \
415 fi; \
416 rm -f $(SHLIBNAME_FULL) || :; \
417 $(LINK_SO_DSO) && chmod a=rx $(SHLIBNAME_FULL)
418 link_shlib.hpux:
419 @if $(DETECT_GNU_LD); then $(DO_GNU_SO); else \
420 ALLSYMSFLAGS='-Wl,-Fl'; \
421 NOALLSYMSFLAGS=''; \
422 expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
423 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$(SHLIBNAME_FULL),+cdp,../:,+cdp,./:"; \
424 fi; \
425 rm -f $(SHLIBNAME_FULL) || :; \
426 $(LINK_SO_SHLIB) && chmod a=rx $(SHLIBNAME_FULL)
427 link_app.hpux:
428 @if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
429 LDFLAGS="$(CFLAGS) $(LDFLAGS) -Wl,+s,+cdp,../:,+cdp,./:"; \
430 fi; \
431 $(LINK_APP)
432
433 link_dso.aix:
434 @OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]*\(64\)'` || :; \
435 OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
436 ALLSYMSFLAGS=''; \
437 NOALLSYMSFLAGS=''; \
438 SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-bexpall,-bnolibpath,-bM:SRE'; \
439 rm -f $(SHLIBNAME_FULL) 2>&1 > /dev/null ; \
440 $(LINK_SO_DSO);
441 link_shlib.aix:
442 @ OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]*\(64\)'` || : ; \
443 OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
444 ALLSYMSFLAGS='-bnogc'; \
445 NOALLSYMSFLAGS=''; \
446 SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-bexpall,-bnolibpath,-bM:SRE'; \
447 rm -f $(SHLIBNAME_FULL) 2>&1 > /dev/null ; \
448 $(LINK_SO_SHLIB_VIA_O)
449 link_app.aix:
450 LDFLAGS="$(CFLAGS) -Wl,-bsvr4 $(LDFLAGS)"; \
451 $(LINK_APP)
452
453
454 # Targets to build symbolic links when needed
455 symlink.gnu symlink.solaris symlink.svr3 symlink.svr5 symlink.irix \
456 symlink.aix:
457 @ $(SYMLINK_SO)
458 symlink.darwin:
459 @ $(SYMLINK_SO)
460 symlink.hpux:
461 @ $(SYMLINK_SO)
462 # The following lines means those specific architectures do no symlinks
463 symlink.cygwin symlink.alpha-osf1 symlink.tru64 symlink.tru64-rpath:
464
465 # Compatibility targets
466 link_dso.bsd-gcc-shared link_dso.linux-shared link_dso.gnu-shared: link_dso.gnu
467 link_shlib.bsd-gcc-shared: link_shlib.linux-shared
468 link_shlib.gnu-shared: link_shlib.gnu
469 link_app.bsd-gcc-shared link_app.linux-shared link_app.gnu-shared: link_app.gnu
470 symlink.bsd-gcc-shared symlink.bsd-shared symlink.linux-shared symlink.gnu-shared: symlink.gnu
471 link_dso.bsd-shared: link_dso.bsd
472 link_shlib.bsd-shared: link_shlib.bsd
473 link_app.bsd-shared: link_app.bsd
474 link_dso.darwin-shared: link_dso.darwin
475 link_shlib.darwin-shared: link_shlib.darwin
476 link_app.darwin-shared: link_app.darwin
477 symlink.darwin-shared: symlink.darwin
478 link_dso.cygwin-shared: link_dso.cygwin
479 link_shlib.cygwin-shared: link_shlib.cygwin
480 link_app.cygwin-shared: link_app.cygwin
481 symlink.cygwin-shared: symlink.cygwin
482 link_dso.mingw-shared: link_dso.cygwin
483 link_shlib.mingw-shared: link_shlib.mingw
484 link_app.mingw-shared: link_app.cygwin
485 symlink.mingw-shared: symlink.cygwin
486 link_dso.alpha-osf1-shared: link_dso.alpha-osf1
487 link_shlib.alpha-osf1-shared: link_shlib.alpha-osf1
488 link_app.alpha-osf1-shared: link_app.alpha-osf1
489 symlink.alpha-osf1-shared: symlink.alpha-osf1
490 link_dso.tru64-shared: link_dso.tru64
491 link_shlib.tru64-shared: link_shlib.tru64
492 link_app.tru64-shared: link_app.tru64
493 symlink.tru64-shared: symlink.tru64
494 link_dso.tru64-shared-rpath: link_dso.tru64-rpath
495 link_shlib.tru64-shared-rpath: link_shlib.tru64-rpath
496 link_app.tru64-shared-rpath: link_app.tru64-rpath
497 symlink.tru64-shared-rpath: symlink.tru64-rpath
498 link_dso.solaris-shared: link_dso.solaris
499 link_shlib.solaris-shared: link_shlib.solaris
500 link_app.solaris-shared: link_app.solaris
501 symlink.solaris-shared: symlink.solaris
502 link_dso.svr3-shared: link_dso.svr3
503 link_shlib.svr3-shared: link_shlib.svr3
504 link_app.svr3-shared: link_app.svr3
505 symlink.svr3-shared: symlink.svr3
506 link_dso.svr5-shared: link_dso.svr5
507 link_shlib.svr5-shared: link_shlib.svr5
508 link_app.svr5-shared: link_app.svr5
509 symlink.svr5-shared: symlink.svr5
510 link_dso.irix-shared: link_dso.irix
511 link_shlib.irix-shared: link_shlib.irix
512 link_app.irix-shared: link_app.irix
513 symlink.irix-shared: symlink.irix
514 link_dso.hpux-shared: link_dso.hpux
515 link_shlib.hpux-shared: link_shlib.hpux
516 link_app.hpux-shared: link_app.hpux
517 symlink.hpux-shared: symlink.hpux
518 link_dso.aix-shared: link_dso.aix
519 link_shlib.aix-shared: link_shlib.aix
520 link_app.aix-shared: link_app.aix
521 symlink.aix-shared: symlink.aix