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 #OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
214 # Check if objects are 32-bit and we're running in 64-bit
215 # environment. If so, pass -m32 flag to linker.
217 ABI32
=`file $1 | grep 32-bit`
218 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
224 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
226 FINAL_LIBS
="${LIBNAME}"
227 elif [ $STATIC = 1 ] ; then
228 LIBNAME
="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a"
229 echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
234 ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
237 FINAL_LIBS
=${LIBNAME}
239 LIBNAME
="lib${LIBNAME}" # prefix with "lib"
240 case $ARCH in 'Linux' |
'GNU' | GNU
/*)
241 OPTS
="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
244 OPTS
="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
247 if [ $EXPORTS ] ; then
248 #OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
249 # Make the 'exptmp' file for --version-script option
250 echo "VERSION_${MAJOR}.${MINOR} {" > exptmp
251 echo "global:" >> exptmp
252 sed 's/$/;/' ${EXPORTS} >> exptmp
253 echo "local:" >> exptmp
256 OPTS
="${OPTS} -Xlinker --version-script=exptmp"
257 # exptmp is removed below
260 # Check if objects are 32-bit and we're running in 64-bit
261 # environment. If so, pass -m32 flag to linker.
263 ABI32
=`file $1 | grep 32-bit`
264 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
268 if [ x
${PATCH} = "x" ] ; then
269 VERSION
="${MAJOR}.${MINOR}"
271 VERSION
="${MAJOR}.${MINOR}.${PATCH}"
274 echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.
${VERSION}
277 rm -f ${LIBNAME}.so.
${VERSION}
278 rm -f ${LIBNAME}.so.
${MAJOR}
282 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
283 # make usual symlinks
284 ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
285 ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
287 FINAL_LIBS
="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
293 if [ $STATIC = 1 ] ; then
294 LIBNAME
="lib${LIBNAME}.a"
295 echo "mklib: Making SunOS static library: " ${LIBNAME}
297 ar -ruv ${LIBNAME} ${OBJECTS}
298 FINAL_LIBS
=${LIBNAME}
300 if [ $NOPREFIX = 0 ] ; then
301 LIBNAME
="lib${LIBNAME}.so"
303 echo "mklib: Making SunOS shared library: " ${LIBNAME}
305 if [ "x$LINK" = "x" ] ; then
306 # -linker was not specified, choose default linker now
307 if [ $CPLUSPLUS = 1 ] ; then
308 # determine linker and options for C++ code
309 if [ `which c++` ] ; then
312 elif [ `type g++` ] ; then
316 echo "mklib: warning: can't find C++ comiler, trying CC."
320 # use native Sun linker for C code
326 if [ ${LINK} = "ld" -o ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
327 # SunOS tools, -G to make shared libs
331 # Check if objects are 32-bit and we're running in 64-bit
332 # environment. If so, pass -m32 flag to linker.
334 ABI32
=`file $1 | grep 32-bit`
335 if [ "${ABI32}" ] ; then
336 OPTS
="-m32 -shared -Wl,-Bdynamic"
338 OPTS
="-m64 -shared -Wl,-Bdynamic"
342 # Check if objects are SPARC v9
343 # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
345 SPARCV9
=`file $1 | grep SPARCV9`
346 if [ "${SPARCV9}" ] ; then
347 OPTS
="${OPTS} -xarch=v9"
351 #echo "mklib: linker is" ${LINK} ${OPTS}
352 if [ $NOPREFIX = 1 ] ; then
354 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
356 rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
357 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
358 ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
360 FINAL_LIBS
="${LIBNAME}.${MAJOR} ${LIBNAME}"
367 if [ "x$LINK" = "x" ] ; then
368 # -linker was not specified so set default link command now
369 if [ $CPLUSPLUS = 1 ] ; then
376 if [ $NOPREFIX = 1 ] ; then
377 # No "lib" or ".so" part
378 echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
381 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
382 FINAL_LIBS
=${LIBNAME}
383 elif [ $STATIC = 1 ] ; then
384 STLIB
="lib${LIBNAME}.a"
385 echo "mklib: Making FreeBSD static library: " ${STLIB}
387 ar cq
${STLIB} ${OBJECTS}
391 SHLIB
="lib${LIBNAME}.so.${MAJOR}"
392 OPTS
="-shared -Wl,-soname,${SHLIB}"
393 echo "mklib: Making FreeBSD shared library: " ${SHLIB}
395 ${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
396 ln -sf ${SHLIB} "lib${LIBNAME}.so"
397 FINAL_LIBS
="${SHLIB} lib${LIBNAME}.so"
402 if [ $STATIC = 1 ] ; then
403 LIBNAME
="lib${LIBNAME}_pic.a"
404 echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
406 ar cq
${LIBNAME} ${OBJECTS}
408 FINAL_LIBS
=${LIBNAME}
410 LIBNAME
="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
411 echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
413 ld
-x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
414 FINAL_LIBS
=${LIBNAME}
419 if [ $STATIC = 1 ] ; then
420 LIBNAME
="lib${LIBNAME}.a"
422 ar rc
${LIBNAME} ${OBJECTS}
423 FINAL_LIBS
=${LIBNAME}
425 LIBNAME
="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
427 # examine first object to determine ABI
429 ABI_O32
=`file $1 | grep 'ELF 32-bit'`
430 ABI_N32
=`file $1 | grep 'ELF N32'`
431 ABI_N64
=`file $1 | grep 'ELF 64-bit'`
432 if [ "${ABI_O32}" ] ; then
433 OPTS
="-32 -shared -all"
435 elif [ "${ABI_N32}" ] ; then
436 OPTS
="-n32 -shared -all"
438 elif [ "${ABI_N64}" ] ; then
439 OPTS
="-64 -shared -all"
442 echo "Error: Unexpected IRIX ABI!"
446 if [ $CPLUSPLUS = 1 ] ; then
452 echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
453 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
454 FINAL_LIBS
=${LIBNAME}
459 LIBNAME
="lib${LIBNAME}.a"
460 echo "mklib: Making linux-cygwin library: " ${LIBNAME}
462 gnuwin32ar ruv
${LIBNAME} ${OBJECTS}
463 FINAL_LIBS
=${LIBNAME}
467 if [ $STATIC = 1 ] ; then
468 LIBNAME
="lib${LIBNAME}.a"
469 echo "mklib: Making HP-UX static library: " ${LIBNAME}
471 ar -ruv ${LIBNAME} ${OBJECTS}
472 FINAL_LIBS
=${LIBNAME}
474 # HP uses a .2 for their current GL/GLU libraries
475 if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
478 RUNLIB
="lib${LIBNAME}.${MAJOR}"
479 DEVLIB
="lib${LIBNAME}.sl"
480 echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB}
481 ld
-b -o ${RUNLIB} +b ${RUNLIB} ${OBJECTS} ${DEPS}
482 ln -s ${RUNLIB} ${DEVLIB}
483 FINAL_LIBS
="${RUNLIB} ${DEVLIB}"
488 # examine first object to determine ABI
490 ABI_64
=`file $1 | grep '64-bit'`
491 if [ "${ABI_64}" ] ; then
496 OFILE
=shr.o
#Want to be consistent with the IBM libGL.a
499 if [ $STATIC = 1 ] ; then
500 LIBNAME
="lib${LIBNAME}.a"
501 echo "mklib: Making AIX static library: " ${LIBNAME}
502 ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
503 FINAL_LIBS
=${LIBNAME}
505 EXPFILE
="lib${LIBNAME}.exp"
506 LIBNAME
="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
507 OPTS
="-bE:${EXPFILE} -bM:SRE -bnoentry ${Q64}"
508 rm -f ${EXPFILE} ${OFILE}
509 NM
="/bin/nm -eC ${X64}"
510 echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
511 ${NM} ${OBJECTS} |
awk '{
512 if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
513 && ( substr($1,1,1) != ".")) {
514 if (substr ($1, 1, 7) != "__sinit" &&
515 substr ($1, 1, 7) != "__sterm") {
516 if (substr ($1, 1, 5) == "__tf1")
517 print (substr ($1, 7))
518 else if (substr ($1, 1, 5) == "__tf9")
519 print (substr ($1, 15))
524 }' |
sort -u >> ${EXPFILE}
526 # On AIX a shared library is linked differently when
527 # you want to dlopen the file
528 if [ $DLOPEN = "1" ] ; then
529 cc
-G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
531 cc
${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
532 ar ${X64} -r ${LIBNAME} ${OFILE}
535 FINAL_LIBS
="${LIBNAME}"
540 LIBNAME
="lib${LIBNAME}.a"
541 echo "mklib: Making OpenSTEP static library: " ${LIBNAME}
542 libtool
-static -o ${LIBNAME} - ${OBJECTS}
543 FINAL_LIBS
=${LIBNAME}
547 if [ $STATIC = 1 ] ; then
548 LIBNAME
="lib${LIBNAME}.a"
549 echo "mklib: Making OSF/1 static library: " ${LIBNAME}
551 ar -ruv ${LIBNAME} ${OBJECTS}
552 FINAL_LIBS
=${LIBNAME}
554 VERSION
="${MAJOR}.${MINOR}"
555 LIBNAME
="lib${LIBNAME}.so"
556 echo "mklib: Making OSF/1 shared library: " ${LIBNAME}
557 if [ "x$LINK" = "x" ] ; then
558 if [ $CPLUSPLUS = 1 ] ; then
564 rm -f ${LIBNAME}.
${VERSION}
565 ${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS}
566 ln -sf ${LIBNAME}.${VERSION} ${LIBNAME}
567 FINAL_LIBS
="${LIBNAME} ${LIBNAME}.${VERSION}"
572 if [ $STATIC = 1 ] ; then
573 LIBNAME
="lib${LIBNAME}.a"
574 echo "mklib: Making Darwin static library: " ${LIBNAME}
577 ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
578 FINAL_LIBS
=${LIBNAME}
580 # On Darwin a .bundle is used for a library that you want to dlopen
581 if [ $DLOPEN = "1" ] ; then
583 OPTS
="${ARCHOPT} -bundle -multiply_defined suppress"
586 OPTS
="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
588 LINKNAME
="lib${LIBNAME}.${LIBSUFFIX}"
589 LIBNAME
="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
591 # examine first object to determine ABI
593 ABI_PPC
=`file $1 | grep 'object ppc'`
594 ABI_I386
=`file $1 | grep 'object i386'`
595 if [ "${ABI_PPC}" ] ; then
596 OPTS
="${OPTS} -arch ppc"
598 if [ "${ABI_I386}" ] ; then
599 OPTS
="${OPTS} -arch i386"
602 # XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
606 if [ $CPLUSPLUS = 1 ] ; then
612 echo "mklib: Making Darwin shared library: " ${LIBNAME}
613 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
614 ln -s ${LIBNAME} ${LINKNAME}
615 FINAL_LIBS
="${LIBNAME} ${LINKNAME}"
620 LIBNAME
="lib${LIBNAME}.a"
621 echo "mklib: Making LynxOS static library: " ${LIBNAME}
623 ar ru
${LIBNAME} ${OBJECTS}
624 FINAL_LIBS
=${LIBNAME}
628 if [ $STATIC = 1 ] ; then
629 LIBNAME
="lib${LIBNAME}.a"
630 echo "mklib: Making BeOS static library: " ${LIBNAME}
631 ar -cru "${LIBNAME}" ${OBJECTS}
633 LIBNAME
="lib${LIBNAME}.so"
634 echo "mklib: Making BeOS shared library: " ${LIBNAME}
635 gcc
-nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}"
636 mimeset
-f "${LIBNAME}"
637 # XXX remove the Mesa3D stuff here since mklib isn't mesa-specific.
638 setversion
"${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D
!" -long "Powered by Mesa3D
!"
640 FINAL_LIBS=${LIBNAME}
644 LIBNAME="lib
${LIBNAME}.a
"
645 echo "mklib
: Making QNX library
: " ${LIBNAME}
646 wlib ${LIBNAME} ${OBJECTS}
647 FINAL_LIBS=${LIBNAME}
651 LIBNAME="lib
${LIBNAME}.a
"
652 echo "mklib
: Making MorphOS library
: " ${LIBNAME}
653 ppc-morphos-ar rc ${LIBNAME} ${OBJECTS}
654 FINAL_LIBS="${LIBNAME}"
657 'icc' | 'icc-istatic')
659 # This should get merged into the Linux code, above, since this isn't
660 # really a different architecture.
661 LIBNAME="lib
${LIBNAME}" # prefix with "lib
"
663 if [ $STATIC = 1 ] ; then
664 echo "mklib
: Making Intel ICC static library
: " ${LIBNAME}.a
668 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
670 FINAL_LIBS="${LIBNAME}.a
"
672 if [ $ARCH = icc-istatic ] ; then
673 OPTS="-shared -i-static -cxxlib-icc"
677 VERSION="${MAJOR}.${MINOR}.${PATCH}"
678 echo "mklib
: Making Intel ICC shared library
: " ${LIBNAME}.so.${VERSION}
680 if [ $CPLUSPLUS = 1 ] ; then
686 rm -f ${LIBNAME}.so.${VERSION}
687 rm -f ${LIBNAME}.so.${MAJOR}
690 ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
691 # make usual symlinks
692 ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
693 ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
695 FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
"
701 if [ $STATIC = 1 ] ; then
702 LIBNAME="lib
${LIBNAME}.a
"
703 echo "mklib
: Making AIX GCC static library
: " ${LIBNAME}
705 ar ru ${LIBNAME} ${OBJECTS}
706 FINAL_LIBS=${LIBNAME}
708 LIBNAME="lib
${LIBNAME}.so
" # prefix with "lib
", suffix with ".so
"
709 echo "mklib
: Making AIX GCC shared library
: " ${LIBNAME}
713 gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME}
714 # NOTE: the application linking with this library must specify
715 # the -Wl,-brtl flags to gcc
716 FINAL_LIBS=${LIBNAME}
722 if [ $STATIC = 0 ] ; then
723 echo "mklib
: Warning shared libs not supported on Ultrix
"
725 LIBNAME="lib
${LIBNAME}.a
"
726 echo "mklib
: Making static library
for Ultrix
: " ${LIBNAME}
728 ar ru ${LIBNAME} ${OBJECTS}
729 FINAL_LIBS="${LIBNAME}"
733 # GCC-based environment
734 CYGNAME="cyg
${LIBNAME}" # prefix with "cyg
"
735 LIBNAME="lib
${LIBNAME}" # prefix with "lib
"
737 if [ $STATIC = 1 ] ; then
738 echo "mklib
: Making
" $ARCH "static library
: " ${LIBNAME}.a
742 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
745 FINAL_LIBS=${LIBNAME}.a
747 OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a
"
748 echo "mklib
: Making
" $ARCH "shared library
: " ${LIBNAME}-${MAJOR}.dll
750 if [ $CPLUSPLUS = 1 ] ; then
757 rm -f ${LIBNAME}-${MAJOR}.dll
758 rm -f ${LIBNAME}.dll.a
762 ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
763 # make usual symlinks
764 ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
766 FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
"
767 # special case for installing in bin
768 FINAL_BINS="${CYGNAME}-${MAJOR}.dll
"
773 # If you're adding support for a new architecture, you can
775 if [ $STATIC = 1 ] ; then
776 LIBNAME="lib
${LIBNAME}.a
"
777 echo "mklib
: Making static library
for example arch
: " ${LIBNAME}
779 ar rv ${LIBNAME} ${OBJECTS}
780 FINAL_LIBS="${LIBNAME}"
782 LIBNAME="lib
${LIBNAME}.so
" # prefix with "lib
", suffix with ".so
"
783 echo "mklib
: Making shared library
for example arch
: " ${LIBNAME}
784 ld -o ${LIBNAME} ${OBJECTS} ${DEPS}
785 FINAL_LIBS="${LIBNAME}"
790 echo "mklib
: ERROR
: Don
't know how to make a static/shared library for" ${ARCH}
791 echo "mklib: Please add necessary commands to mklib script."
797 # Put library files into installation directory if specified.
799 if [ ${INSTALLDIR} != "." ] ; then
800 echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
801 mv ${FINAL_LIBS} ${INSTALLDIR}/