3 # Make a shared library.
4 # This script should be useful for projects other than Mesa.
5 # Improvements/fixes are welcome.
8 # Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
10 # Permission is hereby granted, free of charge, to any person obtaining a
11 # copy of this software and associated documentation files (the "Software"),
12 # to deal in the Software without restriction, including without limitation
13 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 # and/or sell copies of the Software, and to permit persons to whom the
15 # Software is furnished to do so, subject to the following conditions:
17 # The above copyright notice and this permission notice shall be included
18 # in all copies or substantial portions of the Software.
20 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 # BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
55 echo 'Usage: mklib [options] objects'
56 echo 'Create a shared library from object files.'
57 echo ' -o LIBRARY specifies the name of the resulting library, without'
58 echo ' the leading "lib" or any suffix.'
59 echo ' (eg: "-o GL" might result in "libGL.so" being made)'
60 echo ' -major N specifies major version number (default is 1)'
61 echo ' -minor N specifies minor version number (default is 0)'
62 echo ' -patch N specifies patch version number (default is 0)'
63 echo ' -lLIBRARY specifies a dependency on LIBRARY'
64 echo ' -LDIR search in DIR for library dependencies'
65 echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
66 echo ' Not observed on all systems at this time.'
67 echo ' -ldflags OPT specify any additional linker flags in OPT'
68 echo ' -cplusplus link with C++ runtime'
69 echo ' -static make a static library (default is dynamic/shared)'
70 echo ' -dlopen make a shared library suitable for dynamic loading'
71 echo ' -install DIR put resulting library file(s) in DIR'
72 echo ' -arch ARCH override using `uname` to determine host system'
73 echo ' -archopt OPT specify an extra achitecture-specific option OPT'
74 echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
75 echo ' -exports FILE only export the symbols listed in FILE'
76 echo ' -h, --help display this information and exit'
110 # this is a special case (see bugzilla 10876)
114 DEPS
="$DEPS -pthread"
145 echo "mklib: Unknown option: " $1 ;
149 # This should be the first object file, stop parsing
157 if [ ${ARCH} = "auto" ] ; then
165 if [ "x${LIBNAME}" = "x" ] ; then
166 echo "mklib: Error: no library name specified"
169 if [ "x${OBJECTS}" = "x" ] ; then
170 echo "mklib: Error: no object files specified"
179 echo "-----------------"
181 echo LIBNAME is
$LIBNAME
186 echo "EXPORTS in" $EXPORTS
187 echo "-----------------"
192 # OK, make the library now
196 'Linux' |
'OpenBSD' |
'GNU' | GNU
/*)
199 if [ "x$LINK" = "x" ] ; then
200 # -linker was not specified so set default link command now
201 if [ $CPLUSPLUS = 1 ] ; then
208 if [ $NOPREFIX = 1 ] ; then
209 # No "lib" or ".so" part
210 echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
211 case $ARCH in 'Linux' |
'GNU' | GNU
/*)
212 OPTS
="-Xlinker -Bsymbolic -shared"
219 # Check if objects are 32-bit and we're running in 64-bit
220 # environment. If so, pass -m32 flag to linker.
222 ABI32
=`file $1 | grep 32-bit`
223 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
229 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
231 FINAL_LIBS
="${LIBNAME}"
232 elif [ $STATIC = 1 ] ; then
233 LIBNAME
="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a"
234 echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
239 ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
242 FINAL_LIBS
=${LIBNAME}
244 LIBNAME
="lib${LIBNAME}" # prefix with "lib"
245 case $ARCH in 'Linux' |
'GNU' | GNU
/*)
246 OPTS
="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
249 OPTS
="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
252 if [ $EXPORTS ] ; then
253 #OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
254 # Make the 'exptmp' file for --version-script option
255 echo "VERSION_${MAJOR}.${MINOR} {" > exptmp
256 echo "global:" >> exptmp
257 sed 's/$/;/' ${EXPORTS} >> exptmp
258 echo "local:" >> exptmp
261 OPTS
="${OPTS} -Xlinker --version-script=exptmp"
262 # exptmp is removed below
265 # Check if objects are 32-bit and we're running in 64-bit
266 # environment. If so, pass -m32 flag to linker.
268 ABI32
=`file $1 | grep 32-bit`
269 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
273 if [ x
${PATCH} = "x" ] ; then
274 VERSION
="${MAJOR}.${MINOR}"
276 VERSION
="${MAJOR}.${MINOR}.${PATCH}"
279 echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.
${VERSION}
282 rm -f ${LIBNAME}.so.
${VERSION}
283 rm -f ${LIBNAME}.so.
${MAJOR}
287 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
288 # make usual symlinks
289 ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
290 ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
292 FINAL_LIBS
="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
298 if [ $STATIC = 1 ] ; then
299 LIBNAME
="lib${LIBNAME}.a"
300 echo "mklib: Making SunOS static library: " ${LIBNAME}
302 ar -ruv ${LIBNAME} ${OBJECTS}
303 FINAL_LIBS
=${LIBNAME}
305 if [ $NOPREFIX = 0 ] ; then
306 LIBNAME
="lib${LIBNAME}.so"
308 echo "mklib: Making SunOS shared library: " ${LIBNAME}
310 if [ "x$LINK" = "x" ] ; then
311 # -linker was not specified, choose default linker now
312 if [ $CPLUSPLUS = 1 ] ; then
313 # determine linker and options for C++ code
314 if [ `which c++` ] ; then
317 elif [ `type g++` ] ; then
321 echo "mklib: warning: can't find C++ comiler, trying CC."
325 # use native Sun linker for C code
331 if [ ${LINK} = "ld" -o ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
332 # SunOS tools, -G to make shared libs
336 # Check if objects are 32-bit and we're running in 64-bit
337 # environment. If so, pass -m32 flag to linker.
339 ABI32
=`file $1 | grep 32-bit`
340 if [ "${ABI32}" ] ; then
341 OPTS
="-m32 -shared -Wl,-Bdynamic"
343 OPTS
="-m64 -shared -Wl,-Bdynamic"
347 # Check if objects are SPARC v9
348 # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
350 SPARCV9
=`file $1 | grep SPARCV9`
351 if [ "${SPARCV9}" ] ; then
352 OPTS
="${OPTS} -xarch=v9"
356 #echo "mklib: linker is" ${LINK} ${OPTS}
357 if [ $NOPREFIX = 1 ] ; then
359 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
361 rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
362 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
363 ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
365 FINAL_LIBS
="${LIBNAME}.${MAJOR} ${LIBNAME}"
372 if [ "x$LINK" = "x" ] ; then
373 # -linker was not specified so set default link command now
374 if [ $CPLUSPLUS = 1 ] ; then
381 if [ $NOPREFIX = 1 ] ; then
382 # No "lib" or ".so" part
383 echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
386 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
387 FINAL_LIBS
=${LIBNAME}
388 elif [ $STATIC = 1 ] ; then
389 STLIB
="lib${LIBNAME}.a"
390 echo "mklib: Making FreeBSD static library: " ${STLIB}
392 ar cq
${STLIB} ${OBJECTS}
396 SHLIB
="lib${LIBNAME}.so.${MAJOR}"
397 OPTS
="-shared -Wl,-soname,${SHLIB}"
398 echo "mklib: Making FreeBSD shared library: " ${SHLIB}
400 ${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
401 ln -sf ${SHLIB} "lib${LIBNAME}.so"
402 FINAL_LIBS
="${SHLIB} lib${LIBNAME}.so"
407 if [ $STATIC = 1 ] ; then
408 LIBNAME
="lib${LIBNAME}_pic.a"
409 echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
411 ar cq
${LIBNAME} ${OBJECTS}
413 FINAL_LIBS
=${LIBNAME}
415 LIBNAME
="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
416 echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
418 ld
-x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
419 FINAL_LIBS
=${LIBNAME}
424 if [ $STATIC = 1 ] ; then
425 LIBNAME
="lib${LIBNAME}.a"
427 ar rc
${LIBNAME} ${OBJECTS}
428 FINAL_LIBS
=${LIBNAME}
430 LIBNAME
="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
432 # examine first object to determine ABI
434 ABI_O32
=`file $1 | grep 'ELF 32-bit'`
435 ABI_N32
=`file $1 | grep 'ELF N32'`
436 ABI_N64
=`file $1 | grep 'ELF 64-bit'`
437 if [ "${ABI_O32}" ] ; then
438 OPTS
="-32 -shared -all"
440 elif [ "${ABI_N32}" ] ; then
441 OPTS
="-n32 -shared -all"
443 elif [ "${ABI_N64}" ] ; then
444 OPTS
="-64 -shared -all"
447 echo "Error: Unexpected IRIX ABI!"
451 if [ $CPLUSPLUS = 1 ] ; then
457 echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
458 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
459 FINAL_LIBS
=${LIBNAME}
464 LIBNAME
="lib${LIBNAME}.a"
465 echo "mklib: Making linux-cygwin library: " ${LIBNAME}
467 gnuwin32ar ruv
${LIBNAME} ${OBJECTS}
468 FINAL_LIBS
=${LIBNAME}
472 if [ $STATIC = 1 ] ; then
473 LIBNAME
="lib${LIBNAME}.a"
474 echo "mklib: Making HP-UX static library: " ${LIBNAME}
476 ar -ruv ${LIBNAME} ${OBJECTS}
477 FINAL_LIBS
=${LIBNAME}
479 # HP uses a .2 for their current GL/GLU libraries
480 if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
483 RUNLIB
="lib${LIBNAME}.${MAJOR}"
484 DEVLIB
="lib${LIBNAME}.sl"
485 echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB}
486 ld
-b -o ${RUNLIB} +b ${RUNLIB} ${OBJECTS} ${DEPS}
487 ln -s ${RUNLIB} ${DEVLIB}
488 FINAL_LIBS
="${RUNLIB} ${DEVLIB}"
493 # examine first object to determine ABI
495 ABI_64
=`file $1 | grep '64-bit'`
496 if [ "${ABI_64}" ] ; then
501 OFILE
=shr.o
#Want to be consistent with the IBM libGL.a
504 if [ $STATIC = 1 ] ; then
505 LIBNAME
="lib${LIBNAME}.a"
506 echo "mklib: Making AIX static library: " ${LIBNAME}
507 ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
508 FINAL_LIBS
=${LIBNAME}
510 EXPFILE
="lib${LIBNAME}.exp"
511 LIBNAME
="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
512 OPTS
="-bE:${EXPFILE} -bM:SRE -bnoentry ${Q64}"
513 rm -f ${EXPFILE} ${OFILE}
514 NM
="/bin/nm -eC ${X64}"
515 echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
516 ${NM} ${OBJECTS} |
awk '{
517 if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
518 && ( substr($1,1,1) != ".")) {
519 if (substr ($1, 1, 7) != "__sinit" &&
520 substr ($1, 1, 7) != "__sterm") {
521 if (substr ($1, 1, 5) == "__tf1")
522 print (substr ($1, 7))
523 else if (substr ($1, 1, 5) == "__tf9")
524 print (substr ($1, 15))
529 }' |
sort -u >> ${EXPFILE}
531 # On AIX a shared library is linked differently when
532 # you want to dlopen the file
533 if [ $DLOPEN = "1" ] ; then
534 cc
-G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
536 cc
${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
537 ar ${X64} -r ${LIBNAME} ${OFILE}
540 FINAL_LIBS
="${LIBNAME}"
545 LIBNAME
="lib${LIBNAME}.a"
546 echo "mklib: Making OpenSTEP static library: " ${LIBNAME}
547 libtool
-static -o ${LIBNAME} - ${OBJECTS}
548 FINAL_LIBS
=${LIBNAME}
552 if [ $STATIC = 1 ] ; then
553 LIBNAME
="lib${LIBNAME}.a"
554 echo "mklib: Making OSF/1 static library: " ${LIBNAME}
556 ar -ruv ${LIBNAME} ${OBJECTS}
557 FINAL_LIBS
=${LIBNAME}
559 VERSION
="${MAJOR}.${MINOR}"
560 LIBNAME
="lib${LIBNAME}.so"
561 echo "mklib: Making OSF/1 shared library: " ${LIBNAME}
562 if [ "x$LINK" = "x" ] ; then
563 if [ $CPLUSPLUS = 1 ] ; then
569 rm -f ${LIBNAME}.
${VERSION}
570 ${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS}
571 ln -sf ${LIBNAME}.${VERSION} ${LIBNAME}
572 FINAL_LIBS
="${LIBNAME} ${LIBNAME}.${VERSION}"
577 if [ $STATIC = 1 ] ; then
578 LIBNAME
="lib${LIBNAME}.a"
579 echo "mklib: Making Darwin static library: " ${LIBNAME}
582 ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
583 FINAL_LIBS
=${LIBNAME}
585 # On Darwin a .bundle is used for a library that you want to dlopen
586 if [ $DLOPEN = "1" ] ; then
588 OPTS
="${ARCHOPT} -bundle -multiply_defined suppress"
591 OPTS
="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
593 LINKNAME
="lib${LIBNAME}.${LIBSUFFIX}"
594 LIBNAME
="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
596 # examine first object to determine ABI
598 ABI_PPC
=`file $1 | grep 'object ppc'`
599 ABI_I386
=`file $1 | grep 'object i386'`
600 if [ "${ABI_PPC}" ] ; then
601 OPTS
="${OPTS} -arch ppc"
603 if [ "${ABI_I386}" ] ; then
604 OPTS
="${OPTS} -arch i386"
607 # XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
611 if [ $CPLUSPLUS = 1 ] ; then
617 echo "mklib: Making Darwin shared library: " ${LIBNAME}
618 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
619 ln -s ${LIBNAME} ${LINKNAME}
620 FINAL_LIBS
="${LIBNAME} ${LINKNAME}"
625 LIBNAME
="lib${LIBNAME}.a"
626 echo "mklib: Making LynxOS static library: " ${LIBNAME}
628 ar ru
${LIBNAME} ${OBJECTS}
629 FINAL_LIBS
=${LIBNAME}
633 if [ $STATIC = 1 ] ; then
634 LIBNAME
="lib${LIBNAME}.a"
635 echo "mklib: Making BeOS static library: " ${LIBNAME}
636 ar -cru "${LIBNAME}" ${OBJECTS}
638 LIBNAME
="lib${LIBNAME}.so"
639 echo "mklib: Making BeOS shared library: " ${LIBNAME}
640 gcc
-nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}"
641 mimeset
-f "${LIBNAME}"
642 # XXX remove the Mesa3D stuff here since mklib isn't mesa-specific.
643 setversion
"${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D
!" -long "Powered by Mesa3D
!"
645 FINAL_LIBS=${LIBNAME}
649 LIBNAME="lib
${LIBNAME}.a
"
650 echo "mklib
: Making QNX library
: " ${LIBNAME}
651 wlib ${LIBNAME} ${OBJECTS}
652 FINAL_LIBS=${LIBNAME}
656 LIBNAME="lib
${LIBNAME}.a
"
657 echo "mklib
: Making MorphOS library
: " ${LIBNAME}
658 ppc-morphos-ar rc ${LIBNAME} ${OBJECTS}
659 FINAL_LIBS="${LIBNAME}"
662 'icc' | 'icc-istatic')
664 # This should get merged into the Linux code, above, since this isn't
665 # really a different architecture.
666 LIBNAME="lib
${LIBNAME}" # prefix with "lib
"
668 if [ $STATIC = 1 ] ; then
669 echo "mklib
: Making Intel ICC static library
: " ${LIBNAME}.a
673 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
675 FINAL_LIBS="${LIBNAME}.a
"
677 if [ $ARCH = icc-istatic ] ; then
678 OPTS="-shared -i-static -cxxlib-icc"
682 VERSION="${MAJOR}.${MINOR}.${PATCH}"
683 echo "mklib
: Making Intel ICC shared library
: " ${LIBNAME}.so.${VERSION}
685 if [ $CPLUSPLUS = 1 ] ; then
691 rm -f ${LIBNAME}.so.${VERSION}
692 rm -f ${LIBNAME}.so.${MAJOR}
695 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
696 # make usual symlinks
697 ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
698 ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
700 FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
"
706 if [ $STATIC = 1 ] ; then
707 LIBNAME="lib
${LIBNAME}.a
"
708 echo "mklib
: Making AIX GCC static library
: " ${LIBNAME}
710 ar ru ${LIBNAME} ${OBJECTS}
711 FINAL_LIBS=${LIBNAME}
713 LIBNAME="lib
${LIBNAME}.so
" # prefix with "lib
", suffix with ".so
"
714 echo "mklib
: Making AIX GCC shared library
: " ${LIBNAME}
718 gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME}
719 # NOTE: the application linking with this library must specify
720 # the -Wl,-brtl flags to gcc
721 FINAL_LIBS=${LIBNAME}
727 if [ $STATIC = 0 ] ; then
728 echo "mklib
: Warning shared libs not supported on Ultrix
"
730 LIBNAME="lib
${LIBNAME}.a
"
731 echo "mklib
: Making static library
for Ultrix
: " ${LIBNAME}
733 ar ru ${LIBNAME} ${OBJECTS}
734 FINAL_LIBS="${LIBNAME}"
738 # GCC-based environment
739 CYGNAME="cyg
${LIBNAME}" # prefix with "cyg
"
740 LIBNAME="lib
${LIBNAME}" # prefix with "lib
"
742 if [ $STATIC = 1 ] ; then
743 echo "mklib
: Making
" $ARCH "static library
: " ${LIBNAME}.a
747 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
750 FINAL_LIBS=${LIBNAME}.a
752 OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a
"
753 echo "mklib
: Making
" $ARCH "shared library
: " ${LIBNAME}-${MAJOR}.dll
755 if [ $CPLUSPLUS = 1 ] ; then
762 rm -f ${LIBNAME}-${MAJOR}.dll
763 rm -f ${LIBNAME}.dll.a
767 ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
768 # make usual symlinks
769 ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
771 FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
"
772 # special case for installing in bin
773 FINAL_BINS="${CYGNAME}-${MAJOR}.dll
"
778 # If you're adding support for a new architecture, you can
780 if [ $STATIC = 1 ] ; then
781 LIBNAME="lib
${LIBNAME}.a
"
782 echo "mklib
: Making static library
for example arch
: " ${LIBNAME}
784 ar rv ${LIBNAME} ${OBJECTS}
785 FINAL_LIBS="${LIBNAME}"
787 LIBNAME="lib
${LIBNAME}.so
" # prefix with "lib
", suffix with ".so
"
788 echo "mklib
: Making shared library
for example arch
: " ${LIBNAME}
789 ld -o ${LIBNAME} ${OBJECTS} ${DEPS}
790 FINAL_LIBS="${LIBNAME}"
795 echo "mklib
: ERROR
: Don
't know how to make a static/shared library for" ${ARCH}
796 echo "mklib: Please add necessary commands to mklib script."
802 # Put library files into installation directory if specified.
804 if [ ${INSTALLDIR} != "." ] ; then
805 echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
806 mv ${FINAL_LIBS} ${INSTALLDIR}/