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.
54 echo 'Usage: mklib [options] objects'
55 echo 'Create a shared library from object files.'
56 echo ' -o LIBRARY specifies the name of the resulting library, without'
57 echo ' the leading "lib" or any suffix.'
58 echo ' (eg: "-o GL" might result in "libGL.so" being made)'
59 echo ' -major N specifies major version number (default is 1)'
60 echo ' -minor N specifies minor version number (default is 0)'
61 echo ' -patch N specifies patch version number (default is 0)'
62 echo ' -lLIBRARY specifies a dependency on LIBRARY'
63 echo ' -LDIR search in DIR for library dependencies'
64 echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
65 echo ' Not observed on all systems at this time.'
66 echo ' -cplusplus link with C++ runtime'
67 echo ' -static make a static library (default is dynamic/shared)'
68 echo ' -dlopen make a shared library suitable for dynamic loading'
69 echo ' -install DIR put resulting library file(s) in DIR'
70 echo ' -arch ARCH override using `uname` to determine host system'
71 echo ' -archopt OPT specify an extra achitecture-specific option OPT'
72 echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
73 echo ' -exports FILE only export the symbols listed in FILE'
74 echo ' -h, --help display this information and exit'
132 echo "mklib: Unknown option: " $1 ;
136 # This should be the first object file, stop parsing
144 if [ ${ARCH} = "auto" ] ; then
152 if [ "x${LIBNAME}" = "x" ] ; then
153 echo "mklib: Error: no library name specified"
156 if [ "x${OBJECTS}" = "x" ] ; then
157 echo "mklib: Error: no object files specified"
166 echo "-----------------"
168 echo LIBNAME is
$LIBNAME
173 echo "EXPORTS in" $EXPORTS
174 echo "-----------------"
179 # OK, make the library now
183 'Linux' |
'OpenBSD' |
'GNU' | GNU
/*)
186 if [ "x$LINK" = "x" ] ; then
187 # -linker was not specified so set default link command now
188 if [ $CPLUSPLUS = 1 ] ; then
195 if [ $NOPREFIX = 1 ] ; then
196 # No "lib" or ".so" part
197 echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
198 #OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
201 # Check if objects are 32-bit and we're running in 64-bit
202 # environment. If so, pass -m32 flag to linker.
204 ABI32
=`file $1 | grep 32-bit`
205 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
211 ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
213 FINAL_LIBS
="${LIBNAME}"
214 elif [ $STATIC = 1 ] ; then
215 LIBNAME
="lib${LIBNAME}" # prefix with "lib"
216 echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
220 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
223 FINAL_LIBS
=${LIBNAME}.a
225 LIBNAME
="lib${LIBNAME}" # prefix with "lib"
226 case $ARCH in 'Linux' |
'GNU' | GNU
/*)
227 OPTS
="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
230 OPTS
="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
233 if [ $EXPORTS ] ; then
234 #OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
235 # Make the 'exptmp' file for --version-script option
236 echo "VERSION_${MAJOR}.${MINOR} {" > exptmp
237 echo "global:" >> exptmp
238 sed 's/$/;/' ${EXPORTS} >> exptmp
239 echo "local:" >> exptmp
242 OPTS
="${OPTS} -Xlinker --version-script=exptmp"
243 # exptmp is removed below
246 # Check if objects are 32-bit and we're running in 64-bit
247 # environment. If so, pass -m32 flag to linker.
249 ABI32
=`file $1 | grep 32-bit`
250 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
254 if [ x
${PATCH} = "x" ] ; then
255 VERSION
="${MAJOR}.${MINOR}"
257 VERSION
="${MAJOR}.${MINOR}.${PATCH}"
260 echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.
${VERSION}
263 rm -f ${LIBNAME}.so.
${VERSION}
264 rm -f ${LIBNAME}.so.
${MAJOR}
268 ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
269 # make usual symlinks
270 ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
271 ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
273 FINAL_LIBS
="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
279 if [ $STATIC = 1 ] ; then
280 LIBNAME
="lib${LIBNAME}.a"
281 echo "mklib: Making SunOS static library: " ${LIBNAME}
283 ar -ruv ${LIBNAME} ${OBJECTS}
284 FINAL_LIBS
=${LIBNAME}
286 if [ $NOPREFIX = 0 ] ; then
287 LIBNAME
="lib${LIBNAME}.so"
289 echo "mklib: Making SunOS shared library: " ${LIBNAME}
291 if [ "x$LINK" = "x" ] ; then
292 # -linker was not specified, choose default linker now
293 if [ $CPLUSPLUS = 1 ] ; then
294 # determine linker and options for C++ code
295 if [ `which c++` ] ; then
298 elif [ `type g++` ] ; then
302 echo "mklib: warning: can't find C++ comiler, trying CC."
306 # use native Sun linker for C code
312 if [ ${LINK} = "ld" -o ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
313 # SunOS tools, -G to make shared libs
317 # Check if objects are 32-bit and we're running in 64-bit
318 # environment. If so, pass -m32 flag to linker.
320 ABI32
=`file $1 | grep 32-bit`
321 if [ "${ABI32}" ] ; then
322 OPTS
="-m32 -shared -Wl,-Bdynamic"
324 OPTS
="-m64 -shared -Wl,-Bdynamic"
328 # Check if objects are SPARC v9
329 # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
331 SPARCV9
=`file $1 | grep SPARCV9`
332 if [ "${SPARCV9}" ] ; then
333 OPTS
="${OPTS} -xarch=v9"
337 #echo "mklib: linker is" ${LINK} ${OPTS}
338 if [ $NOPREFIX = 1 ] ; then
340 ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
342 rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
343 ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
344 ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
346 FINAL_LIBS
="${LIBNAME}.${MAJOR} ${LIBNAME}"
353 if [ "x$LINK" = "x" ] ; then
354 # -linker was not specified so set default link command now
355 if [ $CPLUSPLUS = 1 ] ; then
362 if [ $NOPREFIX = 1 ] ; then
363 # No "lib" or ".so" part
364 echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
367 ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
368 FINAL_LIBS
=${LIBNAME}
369 elif [ $STATIC = 1 ] ; then
370 STLIB
="lib${LIBNAME}.a"
371 echo "mklib: Making FreeBSD static library: " ${STLIB}
373 ar cq
${STLIB} ${OBJECTS}
377 SHLIB
="lib${LIBNAME}.so.${MAJOR}"
378 OPTS
="-shared -Wl,-soname,${SHLIB}"
379 echo "mklib: Making FreeBSD shared library: " ${SHLIB}
381 ${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
382 ln -sf ${SHLIB} "lib${LIBNAME}.so"
383 FINAL_LIBS
="${SHLIB} lib${LIBNAME}.so"
388 if [ $STATIC = 1 ] ; then
389 LIBNAME
="lib${LIBNAME}_pic.a"
390 echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
392 ar cq
${LIBNAME} ${OBJECTS}
394 FINAL_LIBS
=${LIBNAME}
396 LIBNAME
="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
397 echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
399 ld
-x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
400 FINAL_LIBS
=${LIBNAME}
405 if [ $STATIC = 1 ] ; then
406 LIBNAME
="lib${LIBNAME}.a"
408 ar rc
${LIBNAME} ${OBJECTS}
409 FINAL_LIBS
=${LIBNAME}
411 LIBNAME
="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
413 # examine first object to determine ABI
415 ABI_O32
=`file $1 | grep 'ELF 32-bit'`
416 ABI_N32
=`file $1 | grep 'ELF N32'`
417 ABI_N64
=`file $1 | grep 'ELF 64-bit'`
418 if [ "${ABI_O32}" ] ; then
419 OPTS
="-32 -shared -all"
421 elif [ "${ABI_N32}" ] ; then
422 OPTS
="-n32 -shared -all"
424 elif [ "${ABI_N64}" ] ; then
425 OPTS
="-64 -shared -all"
428 echo "Error: Unexpected IRIX ABI!"
432 if [ $CPLUSPLUS = 1 ] ; then
438 echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
439 ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
440 FINAL_LIBS
=${LIBNAME}
445 LIBNAME
="lib${LIBNAME}.a"
446 echo "mklib: Making linux-cygwin library: " ${LIBNAME}
448 gnuwin32ar ruv
${LIBNAME} ${OBJECTS}
449 FINAL_LIBS
=${LIBNAME}
453 if [ $STATIC = 1 ] ; then
454 LIBNAME
="lib${LIBNAME}.a"
455 echo "mklib: Making HP-UX static library: " ${LIBNAME}
457 ar -ruv ${LIBNAME} ${OBJECTS}
458 FINAL_LIBS
=${LIBNAME}
460 # HP uses a .2 for their current GL/GLU libraries
461 if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
464 RUNLIB
="lib${LIBNAME}.${MAJOR}"
465 DEVLIB
="lib${LIBNAME}.sl"
466 echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB}
467 ld
-b -o ${RUNLIB} +b ${RUNLIB} ${OBJECTS} ${DEPS}
468 ln -s ${RUNLIB} ${DEVLIB}
469 FINAL_LIBS
="${RUNLIB} ${DEVLIB}"
474 # examine first object to determine ABI
476 ABI_64
=`file $1 | grep '64-bit'`
477 if [ "${ABI_64}" ] ; then
482 OFILE
=shr.o
#Want to be consistent with the IBM libGL.a
485 if [ $STATIC = 1 ] ; then
486 LIBNAME
="lib${LIBNAME}.a"
487 echo "mklib: Making AIX static library: " ${LIBNAME}
488 ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
489 FINAL_LIBS
=${LIBNAME}
491 EXPFILE
="lib${LIBNAME}.exp"
492 LIBNAME
="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
493 OPTS
="-bE:${EXPFILE} -bM:SRE -bnoentry ${Q64}"
494 rm -f ${EXPFILE} ${OFILE}
495 NM
="/bin/nm -eC ${X64}"
496 echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
497 ${NM} ${OBJECTS} |
awk '{
498 if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
499 && ( substr($1,1,1) != ".")) {
500 if (substr ($1, 1, 7) != "__sinit" &&
501 substr ($1, 1, 7) != "__sterm") {
502 if (substr ($1, 1, 5) == "__tf1")
503 print (substr ($1, 7))
504 else if (substr ($1, 1, 5) == "__tf9")
505 print (substr ($1, 15))
510 }' |
sort -u >> ${EXPFILE}
512 # On AIX a shared library is linked differently when
513 # you want to dlopen the file
514 if [ $DLOPEN = "1" ] ; then
515 cc
-G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
517 cc
${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
518 ar ${X64} -r ${LIBNAME} ${OFILE}
521 FINAL_LIBS
="${LIBNAME}"
526 LIBNAME
="lib${LIBNAME}.a"
527 echo "mklib: Making OpenSTEP static library: " ${LIBNAME}
528 libtool
-static -o ${LIBNAME} - ${OBJECTS}
529 FINAL_LIBS
=${LIBNAME}
533 if [ $STATIC = 1 ] ; then
534 LIBNAME
="lib${LIBNAME}.a"
535 echo "mklib: Making OSF/1 static library: " ${LIBNAME}
537 ar -ruv ${LIBNAME} ${OBJECTS}
538 FINAL_LIBS
=${LIBNAME}
540 VERSION
="${MAJOR}.${MINOR}"
541 LIBNAME
="lib${LIBNAME}.so"
542 echo "mklib: Making OSF/1 shared library: " ${LIBNAME}
543 if [ "x$LINK" = "x" ] ; then
544 if [ $CPLUSPLUS = 1 ] ; then
550 rm -f ${LIBNAME}.
${VERSION}
551 ${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS}
552 ln -sf ${LIBNAME}.${VERSION} ${LIBNAME}
553 FINAL_LIBS
="${LIBNAME} ${LIBNAME}.${VERSION}"
558 if [ $STATIC = 1 ] ; then
559 LIBNAME
="lib${LIBNAME}.a"
560 echo "mklib: Making Darwin static library: " ${LIBNAME}
563 ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
564 FINAL_LIBS
=${LIBNAME}
566 # On Darwin a .bundle is used for a library that you want to dlopen
567 if [ $DLOPEN = "1" ] ; then
569 OPTS
="${ARCHOPT} -bundle -multiply_defined suppress"
572 OPTS
="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
574 LINKNAME
="lib${LIBNAME}.${LIBSUFFIX}"
575 LIBNAME
="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
577 # examine first object to determine ABI
579 ABI_PPC
=`file $1 | grep 'object ppc'`
580 ABI_I386
=`file $1 | grep 'object i386'`
581 if [ "${ABI_PPC}" ] ; then
582 OPTS
="${OPTS} -arch ppc"
584 if [ "${ABI_I386}" ] ; then
585 OPTS
="${OPTS} -arch i386"
588 # XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
592 if [ $CPLUSPLUS = 1 ] ; then
598 echo "mklib: Making Darwin shared library: " ${LIBNAME}
599 ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
600 ln -s ${LIBNAME} ${LINKNAME}
601 FINAL_LIBS
="${LIBNAME} ${LINKNAME}"
606 LIBNAME
="lib${LIBNAME}.a"
607 echo "mklib: Making LynxOS static library: " ${LIBNAME}
609 ar ru
${LIBNAME} ${OBJECTS}
610 FINAL_LIBS
=${LIBNAME}
614 if [ $STATIC = 1 ] ; then
615 LIBNAME
="lib${LIBNAME}.a"
616 echo "mklib: Making BeOS static library: " ${LIBNAME}
617 ar -cru "${LIBNAME}" ${OBJECTS}
619 LIBNAME
="lib${LIBNAME}.so"
620 echo "mklib: Making BeOS shared library: " ${LIBNAME}
621 gcc
-nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}"
622 mimeset
-f "${LIBNAME}"
623 # XXX remove the Mesa3D stuff here since mklib isn't mesa-specific.
624 setversion
"${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D
!" -long "Powered by Mesa3D
!"
626 FINAL_LIBS=${LIBNAME}
630 LIBNAME="lib
${LIBNAME}.a
"
631 echo "mklib
: Making QNX library
: " ${LIBNAME}
632 wlib ${LIBNAME} ${OBJECTS}
633 FINAL_LIBS=${LIBNAME}
637 LIBNAME="lib
${LIBNAME}.a
"
638 echo "mklib
: Making MorphOS library
: " ${LIBNAME}
639 ppc-morphos-ar rc ${LIBNAME} ${OBJECTS}
640 FINAL_LIBS="${LIBNAME}"
643 'icc' | 'icc-istatic')
645 # This should get merged into the Linux code, above, since this isn't
646 # really a different architecture.
647 LIBNAME="lib
${LIBNAME}" # prefix with "lib
"
649 if [ $STATIC = 1 ] ; then
650 echo "mklib
: Making Intel ICC static library
: " ${LIBNAME}.a
654 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
656 FINAL_LIBS="${LIBNAME}.a
"
658 if [ $ARCH = icc-istatic ] ; then
659 OPTS="-shared -i-static -cxxlib-icc"
663 VERSION="${MAJOR}.${MINOR}.${PATCH}"
664 echo "mklib
: Making Intel ICC shared library
: " ${LIBNAME}.so.${VERSION}
666 if [ $CPLUSPLUS = 1 ] ; then
672 rm -f ${LIBNAME}.so.${VERSION}
673 rm -f ${LIBNAME}.so.${MAJOR}
676 ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
677 # make usual symlinks
678 ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
679 ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
681 FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
"
687 if [ $STATIC = 1 ] ; then
688 LIBNAME="lib
${LIBNAME}.a
"
689 echo "mklib
: Making AIX GCC static library
: " ${LIBNAME}
691 ar ru ${LIBNAME} ${OBJECTS}
692 FINAL_LIBS=${LIBNAME}
694 LIBNAME="lib
${LIBNAME}.so
" # prefix with "lib
", suffix with ".so
"
695 echo "mklib
: Making AIX GCC shared library
: " ${LIBNAME}
699 gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME}
700 # NOTE: the application linking with this library must specify
701 # the -Wl,-brtl flags to gcc
702 FINAL_LIBS=${LIBNAME}
708 if [ $STATIC = 0 ] ; then
709 echo "mklib
: Warning shared libs not supported on Ultrix
"
711 LIBNAME="lib
${LIBNAME}.a
"
712 echo "mklib
: Making static library
for Ultrix
: " ${LIBNAME}
714 ar ru ${LIBNAME} ${OBJECTS}
715 FINAL_LIBS="${LIBNAME}"
719 # GCC-based environment
720 CYGNAME="cyg
${LIBNAME}" # prefix with "cyg
"
721 LIBNAME="lib
${LIBNAME}" # prefix with "lib
"
723 if [ $STATIC = 1 ] ; then
724 echo "mklib
: Making
" $ARCH "static library
: " ${LIBNAME}.a
728 ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
731 FINAL_LIBS=${LIBNAME}.a
733 OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a
"
734 echo "mklib
: Making
" $ARCH "shared library
: " ${LIBNAME}-${MAJOR}.dll
736 if [ $CPLUSPLUS = 1 ] ; then
743 rm -f ${LIBNAME}-${MAJOR}.dll
744 rm -f ${LIBNAME}.dll.a
748 ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
749 # make usual symlinks
750 ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
752 FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
"
753 # special case for installing in bin
754 FINAL_BINS="${CYGNAME}-${MAJOR}.dll
"
759 # If you're adding support for a new architecture, you can
761 if [ $STATIC = 1 ] ; then
762 LIBNAME="lib
${LIBNAME}.a
"
763 echo "mklib
: Making static library
for example arch
: " ${LIBNAME}
765 ar rv ${LIBNAME} ${OBJECTS}
766 FINAL_LIBS="${LIBNAME}"
768 LIBNAME="lib
${LIBNAME}.so
" # prefix with "lib
", suffix with ".so
"
769 echo "mklib
: Making shared library
for example arch
: " ${LIBNAME}
770 ld -o ${LIBNAME} ${OBJECTS} ${DEPS}
771 FINAL_LIBS="${LIBNAME}"
776 echo "mklib
: ERROR
: Don
't know how to make a static/shared library for" ${ARCH}
777 echo "mklib: Please add necessary commands to mklib script."
783 # Put library files into installation directory if specified.
785 if [ ${INSTALLDIR} != "." ] ; then
786 echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
787 mv ${FINAL_LIBS} ${INSTALLDIR}/