]> git.ipfire.org Git - thirdparty/openssl.git/blob - Makefile.shared
Make EVP_PKEY_asn1_add0() stricter about its input
[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
24 # LIBNAME contains just the name of the library, without prefix ("lib"
25 # on Unix, "cyg" for certain forms under Cygwin...) or suffix (.a, .so,
26 # .dll, ...). This one MUST have a value when using this makefile to
27 # build shared libraries.
28 # For example, to build libfoo.so, you need to do the following:
29 #LIBNAME=foo
30 LIBNAME=
31
32 # STLIBNAME contains the path of the static library to build the shared
33 # library from, for example:
34 #STLIBNAME=libfoo.a
35 STLIBNAME=
36
37 # On most Unix platforms, SHLIBNAME contains the path of the short name of
38 # the shared library to build, for example
39 #SHLIBNAME=libfoo.so
40 # On Windows POSIX layers (cygwin and mingw), SHLIBNAME contains the import
41 # library name for the shared library to be built, for example:
42 #SHLIBNAME=libfoo.dll.a
43
44 # SHLIBNAME_FULL contains the path of the full name of the shared library to
45 # build, for example:
46 #SHLIBNAME_FULL=libfoo.so.1.2
47 # When building DSOs, SHLIBNAME_FULL contains path of the full DSO name, for
48 # example:
49 #SHLIBNAME_FULL=dir/dso.so
50 SHLIBNAME_FULL=
51
52 # SHLIBVERSION contains the current version of the shared library (not to
53 # be confused with the project version)
54 #SHLIBVERSION=1.2
55 SHLIBVERSION=
56
57 # NOTE: to build shared libraries, LIBNAME, STLIBNAME, SHLIBNAME and
58 # SHLIBNAME_FULL MUST have values when using this makefile, and in some
59 # cases, SHLIBVERSION as well. To build DSOs, SHLIBNAME_FULL MUST have
60 # a value, the rest can be left alone.
61
62
63 # APPNAME contains just the name of the application, without suffix (""
64 # on Unix, ".exe" on Windows, ...). This one MUST have a value when using
65 # this makefile to build applications.
66 # For example, to build foo, you need to do the following:
67 #APPNAME=foo
68 APPNAME=
69
70 # SRCDIR is the top directory of the source tree.
71 SRCDIR=.
72
73 # OBJECTS contains all the object files to link together into the application.
74 # This must contain at least one object file.
75 #OBJECTS=foo.o
76 OBJECTS=
77
78 # LIBEXTRAS contains extra modules to link together with the library.
79 # For example, if a second library, say libbar.a needs to be linked into
80 # libfoo.so, you need to do the following:
81 #LIBEXTRAS=libbar.a
82 # Note that this MUST be used when using the link_dso targets, to hold the
83 # names of all object files that go into the target shared object.
84 LIBEXTRAS=
85
86 # LIBDEPS contains all the flags necessary to cover all necessary
87 # dependencies to other libraries.
88 LIBDEPS=
89
90 #------------------------------------------------------------------------------
91 # The rest is private to this makefile.
92
93 SET_X=:
94 #SET_X=set -x
95
96 top:
97 echo "Trying to use this makefile interactively? Don't."
98
99 LINK_APP= \
100 ( $(SET_X); \
101 LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
102 LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS) $(LDFLAGS)}"; \
103 LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
104 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
105 echo LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
106 $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS}; \
107 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
108 $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
109
110 LINK_SO= \
111 ( $(SET_X); \
112 LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
113 SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
114 SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
115 LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
116 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
117 echo LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
118 $${SHAREDCMD} $${SHAREDFLAGS} \
119 -o $(SHLIBNAME_FULL) \
120 $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS; \
121 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
122 $${SHAREDCMD} $${SHAREDFLAGS} \
123 -o $(SHLIBNAME_FULL) \
124 $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
125 ) && $(SYMLINK_SO)
126
127 SYMLINK_SO= \
128 if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
129 if [ -n "$(SHLIBNAME_FULL)" -a -n "$(SHLIBNAME)" -a \
130 "$(SHLIBNAME_FULL)" != "$(SHLIBNAME)" ]; then \
131 ( $(SET_X); \
132 rm -f $(SHLIBNAME); \
133 ln -s $(SHLIBNAME_FULL) $(SHLIBNAME) ); \
134 fi; \
135 fi
136
137 LINK_SO_SHLIB= SHOBJECTS="$(STLIBNAME) $(LIBEXTRAS)"; $(LINK_SO)
138 LINK_SO_DSO= INHIBIT_SYMLINKS=yes; SHOBJECTS="$(LIBEXTRAS)"; $(LINK_SO)
139
140 LINK_SO_SHLIB_VIA_O= \
141 SHOBJECTS=$(STLIBNAME).o; \
142 ALL=$$ALLSYMSFLAGS; ALLSYMSFLAGS=; NOALLSYMSFLAGS=; \
143 ( echo ld $(LDFLAGS) -r -o $$SHOBJECTS $$ALL $(STLIBNAME) $(LIBEXTRAS); \
144 ld $(LDFLAGS) -r -o $$SHOBJECTS $$ALL $(STLIBNAME) $(LIBEXTRAS) ); \
145 $(LINK_SO) && ( echo rm -f $$SHOBJECTS; rm -f $$SHOBJECTS )
146
147 LINK_SO_SHLIB_UNPACKED= \
148 UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
149 (cd $$UNPACKDIR; ar x ../$(STLIBNAME)) && \
150 ([ -z "$(LIBEXTRAS)" ] || cp $(LIBEXTRAS) $$UNPACKDIR) && \
151 SHOBJECTS=$$UNPACKDIR/*.o; \
152 $(LINK_SO) && rm -rf $$UNPACKDIR
153
154 DETECT_GNU_LD=($(CC) -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
155
156 DO_GNU_SO_COMMON=\
157 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$(SHLIBNAME_FULL)"
158 DO_GNU_DSO=\
159 $(DO_GNU_SO_COMMON)
160 DO_GNU_SO=\
161 ALLSYMSFLAGS='-Wl,--whole-archive'; \
162 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
163 $(DO_GNU_SO_COMMON)
164 DO_GNU_APP=LDFLAGS="$(CFLAGS) $(LDFLAGS)"
165
166 #This is rather special. It's a special target with which one can link
167 #applications without bothering with any features that have anything to
168 #do with shared libraries, for example when linking against static
169 #libraries. It's mostly here to avoid a lot of conditionals everywhere
170 #else...
171 link_app.:
172 $(LINK_APP)
173
174 link_dso.gnu:
175 @ $(DO_GNU_DSO); $(LINK_SO_DSO)
176 link_shlib.gnu:
177 @ $(DO_GNU_SO); $(LINK_SO_SHLIB)
178 link_app.gnu:
179 @ $(DO_GNU_APP); $(LINK_APP)
180
181 link_shlib.linux-shared:
182 @$(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
183 $(DO_GNU_SO); \
184 ALLSYMSFLAGS='-Wl,--whole-archive,--version-script=$(LIBNAME).map'; \
185 $(LINK_SO_SHLIB)
186
187 link_dso.bsd:
188 @if $(DETECT_GNU_LD); then $(DO_GNU_DSO); else \
189 LIBDEPS=" "; \
190 ALLSYMSFLAGS=; \
191 NOALLSYMSFLAGS=; \
192 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -nostdlib"; \
193 fi; $(LINK_SO_DSO)
194 link_shlib.bsd:
195 @if $(DETECT_GNU_LD); then $(DO_GNU_SO); else \
196 LIBDEPS=" "; \
197 ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
198 NOALLSYMSFLAGS=; \
199 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -nostdlib"; \
200 fi; $(LINK_SO_SHLIB)
201 link_app.bsd:
202 @if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
203 LDFLAGS="$(CFLAGS) $(LDFLAGS)"; \
204 fi; $(LINK_APP)
205
206 # For Darwin AKA Mac OS/X (dyld)
207 # Originally link_dso.darwin produced .so, because it was hard-coded
208 # in dso_dlfcn module. At later point dso_dlfcn switched to .dylib
209 # extension in order to allow for run-time linking with vendor-
210 # supplied shared libraries such as libz, so that link_dso.darwin had
211 # to be harmonized with it. This caused minor controversy, because
212 # it was believed that dlopen can't be used to dynamically load
213 # .dylib-s, only so called bundle modules (ones linked with -bundle
214 # flag). The belief seems to be originating from pre-10.4 release,
215 # where dlfcn functionality was emulated by dlcompat add-on. In
216 # 10.4 dlopen was rewritten as native part of dyld and is documented
217 # to be capable of loading both dynamic libraries and bundles. In
218 # order to provide compatibility with pre-10.4 dlopen, modules are
219 # linked with -bundle flag, which makes .dylib extension misleading.
220 # It works, because dlopen is [and always was] extension-agnostic.
221 # Alternative to this heuristic approach is to develop specific
222 # MacOS X dso module relying on whichever "native" dyld interface.
223 link_dso.darwin:
224 @ ALLSYMSFLAGS=''; \
225 NOALLSYMSFLAGS=''; \
226 SHAREDFLAGS="$(CFLAGS) `echo $(SHARED_LDFLAGS) | sed s/dynamiclib/bundle/`"; \
227 $(LINK_SO_DSO)
228 link_shlib.darwin:
229 @ ALLSYMSFLAGS='-all_load'; \
230 NOALLSYMSFLAGS=''; \
231 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -current_version $(SHLIBVERSION) -compatibility_version $(SHLIBVERSION) -install_name $(INSTALLTOP)/$(LIBDIR)/$(SHLIBNAME_FULL)"; \
232 $(LINK_SO_SHLIB)
233 link_app.darwin: # is there run-path on darwin?
234 $(LINK_APP)
235
236 link_dso.cygwin:
237 @ALLSYMSFLAGS=''; \
238 NOALLSYMSFLAGS=''; \
239 base=-Wl,--enable-auto-image-base; \
240 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic"; \
241 $(LINK_SO_DSO)
242 link_shlib.cygwin:
243 @ INHIBIT_SYMLINKS=yes; \
244 echo "$(PERL) $(SRCDIR)/util/mkrc.pl $(SHLIBNAME_FULL) |" \
245 "$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
246 $(PERL) $(SRCDIR)/util/mkrc.pl $(SHLIBNAME_FULL) | \
247 $(RC) $(SHARED_RCFLAGS) -o rc.o; \
248 ALLSYMSFLAGS='-Wl,--whole-archive'; \
249 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
250 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,--enable-auto-image-base -Wl,-Bsymbolic -Wl,--out-implib,$(SHLIBNAME) rc.o"; \
251 $(LINK_SO_SHLIB) || exit 1; \
252 rm rc.o
253 link_app.cygwin:
254 $(LINK_APP)
255
256 # link_dso.mingw-shared and link_app.mingw-shared are mapped to the
257 # corresponding cygwin targets, as they do the exact same thing.
258 link_shlib.mingw:
259 @ INHIBIT_SYMLINKS=yes; \
260 base=; [ $(LIBNAME) = "crypto" -a -n "$(FIPSCANLIB)" ] && base=-Wl,--image-base,0x63000000; \
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 $$base -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