Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Make a shared library. |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 4 | # This script should be useful for projects other than Mesa. |
| 5 | # Improvements/fixes are welcome. |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 6 | |
| 7 | |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 8 | # Copyright (C) 1999-2005 Brian Paul All Rights Reserved. |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 9 | # |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 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: |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 16 | # |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 17 | # The above copyright notice and this permission notice shall be included |
| 18 | # in all copies or substantial portions of the Software. |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 19 | # |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 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. |
| 26 | |
| 27 | |
| 28 | function usage() |
| 29 | { |
| 30 | echo 'Usage: mklib [options] objects' |
| 31 | echo 'Create a shared library from object files.' |
| 32 | echo ' -o LIBRARY specifies the name of the resulting library, without' |
| 33 | echo ' the leading "lib" or any suffix.' |
| 34 | echo ' (eg: "-o GL" might result in "libGL.so" being made)' |
| 35 | echo ' -major N specifies major version number (default is 1)' |
| 36 | echo ' -minor N specifies minor version number (default is 0)' |
| 37 | echo ' -patch N specifies patch version number (default is 0)' |
| 38 | echo ' -lLIBRARY specifies a dependency on LIBRARY' |
| 39 | echo ' -LDIR search in DIR for library dependencies' |
| 40 | echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' |
| 41 | echo ' Not observed on all systems at this time.' |
| 42 | echo ' -cplusplus link with C++ runtime' |
| 43 | echo ' -static make a static library (default is dynamic/shared)' |
| 44 | echo ' -install DIR put resulting library file(s) in DIR' |
| 45 | echo ' -arch ARCH override using `uname` to determine host system' |
| 46 | echo ' -archopt OPT specify an extra achitecture-specific option OPT' |
| 47 | echo " -noprefix don't prefix library name with 'lib' nor add any suffix" |
| 48 | echo ' -exports FILE only export the symbols listed in FILE' |
| 49 | echo ' -h, --help display this information and exit' |
| 50 | } |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 51 | |
| 52 | |
| 53 | # |
| 54 | # Option defaults |
| 55 | # |
| 56 | LIBNAME="" |
| 57 | MAJOR=1 |
| 58 | MINOR=0 |
Brian Paul | 6e450f2 | 2004-02-21 18:08:41 +0000 | [diff] [blame] | 59 | PATCH="" |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 60 | DEPS="" |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 61 | LINK="" |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 62 | CPLUSPLUS=0 |
| 63 | STATIC=0 |
| 64 | INSTALLDIR="." |
| 65 | ARCH="auto" |
| 66 | ARCHOPT="" |
Brian Paul | dd74e36 | 2004-04-08 22:26:22 +0000 | [diff] [blame] | 67 | NOPREFIX=0 |
Brian Paul | 158a251 | 2004-10-16 15:10:45 +0000 | [diff] [blame] | 68 | EXPORTS="" |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 69 | |
| 70 | |
| 71 | # |
| 72 | # Parse arguments |
| 73 | # |
| 74 | while true |
| 75 | do |
| 76 | case $1 in |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 77 | '-h' | '--help') |
| 78 | usage; |
| 79 | exit 1 |
| 80 | ;; |
| 81 | '-o') |
| 82 | shift 1; |
| 83 | LIBNAME=$1 |
| 84 | ;; |
| 85 | '-major') |
| 86 | shift 1; |
| 87 | MAJOR=$1 |
| 88 | ;; |
| 89 | '-minor') |
| 90 | shift 1; |
| 91 | MINOR=$1 |
| 92 | ;; |
| 93 | '-patch') |
| 94 | shift 1; |
| 95 | PATCH=$1 |
| 96 | ;; |
| 97 | '-linker') |
| 98 | shift 1; |
| 99 | LINK=$1 |
| 100 | ;; |
| 101 | -l*) |
| 102 | DEPS="$DEPS $1" |
| 103 | ;; |
| 104 | -L*) |
| 105 | DEPS="$DEPS $1" |
| 106 | ;; |
| 107 | '-cplusplus') |
| 108 | CPLUSPLUS=1 |
| 109 | ;; |
| 110 | '-static') |
| 111 | STATIC=1 |
| 112 | ;; |
| 113 | '-install') |
| 114 | shift 1; |
| 115 | INSTALLDIR=$1 |
| 116 | ;; |
| 117 | '-arch') |
| 118 | shift 1; |
| 119 | ARCH=$1 |
| 120 | ;; |
| 121 | '-archopt') |
| 122 | shift 1; |
| 123 | ARCHOPT=$1 |
| 124 | ;; |
| 125 | '-noprefix') |
| 126 | NOPREFIX=1 |
| 127 | ;; |
| 128 | '-exports') |
| 129 | shift 1; |
| 130 | EXPORTS=$1 |
| 131 | ;; |
| 132 | -*) |
| 133 | echo "mklib: Unknown option: " $1 ; |
| 134 | exit 1 |
| 135 | ;; |
| 136 | *) |
| 137 | # This should be the first object file, stop parsing |
| 138 | break |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 139 | esac |
| 140 | shift 1 |
| 141 | done |
| 142 | OBJECTS=$@ |
| 143 | |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 144 | |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 145 | if [ ${ARCH} = "auto" ] ; then |
| 146 | ARCH=`uname` |
| 147 | fi |
| 148 | |
| 149 | |
| 150 | # |
| 151 | # Error checking |
| 152 | # |
| 153 | if [ "x${LIBNAME}" = "x" ] ; then |
| 154 | echo "mklib: Error: no library name specified" |
| 155 | exit 1 |
| 156 | fi |
| 157 | if [ "x${OBJECTS}" = "x" ] ; then |
| 158 | echo "mklib: Error: no object files specified" |
| 159 | exit 1 |
| 160 | fi |
| 161 | |
| 162 | |
| 163 | # |
| 164 | # Debugging info |
| 165 | # |
| 166 | if [ ] ; then |
| 167 | echo "-----------------" |
| 168 | echo ARCH is $ARCH |
| 169 | echo LIBNAME is $LIBNAME |
| 170 | echo MAJOR is $MAJOR |
| 171 | echo MINOR is $MINOR |
| 172 | echo PATCH is $PATCH |
| 173 | echo DEPS are $DEPS |
Brian Paul | 158a251 | 2004-10-16 15:10:45 +0000 | [diff] [blame] | 174 | echo "EXPORTS in" $EXPORTS |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 175 | echo "-----------------" |
| 176 | fi |
| 177 | |
| 178 | |
| 179 | # |
| 180 | # OK, make the library now |
| 181 | # |
| 182 | case $ARCH in |
| 183 | |
Brian Paul | 12d6cae | 2004-01-10 22:12:21 +0000 | [diff] [blame] | 184 | 'Linux' | 'OpenBSD') |
Brian Paul | 158a251 | 2004-10-16 15:10:45 +0000 | [diff] [blame] | 185 | # we assume gcc |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 186 | |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 187 | if [ "x$LINK" = "x" ] ; then |
| 188 | # -linker was not specified so set default link command now |
| 189 | if [ $CPLUSPLUS = 1 ] ; then |
| 190 | LINK=g++ |
| 191 | else |
| 192 | LINK=gcc |
| 193 | fi |
Brian Paul | c498742 | 2004-10-16 15:02:16 +0000 | [diff] [blame] | 194 | fi |
| 195 | |
Brian Paul | dd74e36 | 2004-04-08 22:26:22 +0000 | [diff] [blame] | 196 | if [ $NOPREFIX = 1 ] ; then |
| 197 | # No "lib" or ".so" part |
| 198 | echo "mklib: Making" $ARCH "shared library: " ${LIBNAME} |
| 199 | #OPTS="-shared -Wl,-soname,${LIBNAME}" # soname??? |
| 200 | OPTS="-shared" |
Brian Paul | dd74e36 | 2004-04-08 22:26:22 +0000 | [diff] [blame] | 201 | rm -f ${LIBNAME} |
Brian Paul | dd74e36 | 2004-04-08 22:26:22 +0000 | [diff] [blame] | 202 | # make lib |
| 203 | ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} |
| 204 | # finish up |
| 205 | FINAL_LIBS="${LIBNAME}" |
| 206 | elif [ $STATIC = 1 ] ; then |
| 207 | LIBNAME="lib${LIBNAME}" # prefix with "lib" |
Brian Paul | 5b9a9d4 | 2004-01-17 18:31:12 +0000 | [diff] [blame] | 208 | echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a |
Brian Paul | 1c4b711 | 2003-10-10 17:58:38 +0000 | [diff] [blame] | 209 | LINK="ar" |
Brian Paul | 6e450f2 | 2004-02-21 18:08:41 +0000 | [diff] [blame] | 210 | OPTS="-ru" |
Brian Paul | 1c4b711 | 2003-10-10 17:58:38 +0000 | [diff] [blame] | 211 | # make lib |
| 212 | ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} |
Brian Paul | 6e450f2 | 2004-02-21 18:08:41 +0000 | [diff] [blame] | 213 | ranlib ${LIBNAME}.a |
Brian Paul | 1c4b711 | 2003-10-10 17:58:38 +0000 | [diff] [blame] | 214 | # finish up |
Brian Paul | 6e450f2 | 2004-02-21 18:08:41 +0000 | [diff] [blame] | 215 | FINAL_LIBS=${LIBNAME}.a |
Brian Paul | 1c4b711 | 2003-10-10 17:58:38 +0000 | [diff] [blame] | 216 | else |
Brian Paul | dd74e36 | 2004-04-08 22:26:22 +0000 | [diff] [blame] | 217 | LIBNAME="lib${LIBNAME}" # prefix with "lib" |
Brian Paul | 5b9a9d4 | 2004-01-17 18:31:12 +0000 | [diff] [blame] | 218 | if [ $ARCH = 'Linux' ] ; then |
| 219 | OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" |
| 220 | else |
| 221 | OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" |
| 222 | fi |
Brian Paul | 158a251 | 2004-10-16 15:10:45 +0000 | [diff] [blame] | 223 | if [ $EXPORTS ] ; then |
| 224 | #OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}" |
| 225 | # Make the 'exptmp' file for --version-script option |
| 226 | echo "VERSION_${MAJOR}.${MINOR} {" > exptmp |
| 227 | echo "global:" >> exptmp |
| 228 | sed 's/$/;/' ${EXPORTS} >> exptmp |
| 229 | echo "local:" >> exptmp |
| 230 | echo "*;" >> exptmp |
| 231 | echo "};" >> exptmp |
| 232 | OPTS="${OPTS} -Xlinker --version-script=exptmp" |
| 233 | # exptmp is removed below |
| 234 | fi |
Brian Paul | 3e19618 | 2005-03-03 01:38:13 +0000 | [diff] [blame] | 235 | |
| 236 | # Check if objects are 32-bit and we're running in 64-bit |
| 237 | # environment. If so, pass -m32 flag to linker. |
| 238 | set ${OBJECTS} |
| 239 | ABI32=`file $1 | grep 32-bit` |
| 240 | if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then |
| 241 | OPTS="-m32 ${OPTS}" |
| 242 | fi |
| 243 | |
Brian Paul | 6e450f2 | 2004-02-21 18:08:41 +0000 | [diff] [blame] | 244 | if [ x${PATCH} = "x" ] ; then |
| 245 | VERSION="${MAJOR}.${MINOR}" |
| 246 | else |
| 247 | VERSION="${MAJOR}.${MINOR}.${PATCH}" |
| 248 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 249 | |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 250 | echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION} |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 251 | |
Brian Paul | 1c4b711 | 2003-10-10 17:58:38 +0000 | [diff] [blame] | 252 | # rm any old libs |
| 253 | rm -f ${LIBNAME}.so.${VERSION} |
| 254 | rm -f ${LIBNAME}.so.${MAJOR} |
| 255 | rm -f ${LIBNAME}.so |
| 256 | |
| 257 | # make lib |
| 258 | ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} |
| 259 | # make usual symlinks |
| 260 | ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} |
| 261 | ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so |
| 262 | # finish up |
| 263 | FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so" |
Brian Paul | b17a1a1 | 2004-11-01 22:28:42 +0000 | [diff] [blame] | 264 | # rm -f exptmp |
Brian Paul | 1c4b711 | 2003-10-10 17:58:38 +0000 | [diff] [blame] | 265 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 266 | ;; |
| 267 | |
| 268 | 'SunOS') |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 269 | if [ $STATIC = 1 ] ; then |
| 270 | LIBNAME="lib${LIBNAME}.a" |
| 271 | echo "mklib: Making SunOS static library: " ${LIBNAME} |
| 272 | rm -f ${LIBNAME} |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 273 | ar -ruv ${LIBNAME} ${OBJECTS} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 274 | FINAL_LIBS=${LIBNAME} |
| 275 | else |
| 276 | LIBNAME="lib${LIBNAME}.so" |
| 277 | echo "mklib: Making SunOS shared library: " ${LIBNAME} |
| 278 | # XXX OPTS for gcc should be -shared, but that doesn't work. |
| 279 | # Using -G does work though. |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 280 | OPTS="-G" |
| 281 | if [ "x$LINK" = "x" ] ; then |
| 282 | # -linker was not specified, choose default linker now |
| 283 | if [ $CPLUSPLUS = 1 ] ; then |
| 284 | # determine linker and options for C++ code |
| 285 | if [ `which c++` ] ; then |
| 286 | # use Sun c++ |
| 287 | LINK="c++" |
| 288 | elif [ `type g++` ] ; then |
| 289 | # use g++ |
| 290 | LINK="g++" |
| 291 | else |
| 292 | echo "mklib: warning: can't find C++ comiler, trying CC." |
| 293 | LINK="CC" |
| 294 | fi |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 295 | else |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 296 | # use native Sun linker for C code |
| 297 | LINK="ld" |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 298 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 299 | fi |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 300 | echo "mklib: linker is" ${LINK} ${OPTS} |
| 301 | rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} |
| 302 | ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} |
| 303 | ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} |
| 304 | FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 305 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 306 | ;; |
| 307 | |
| 308 | 'FreeBSD') |
Brian Paul | dd74e36 | 2004-04-08 22:26:22 +0000 | [diff] [blame] | 309 | if [ $NOPREFIX = 1 ] ; then |
| 310 | # No "lib" or ".so" part |
| 311 | echo "mklib: Making FreeBSD shared library: " ${LIBNAME} |
| 312 | rm -f ${LIBNAME} |
| 313 | ld -Bshareable -o ${LIBNAME} ${OBJECTS} |
| 314 | FINAL_LIBS=${LIBNAME} |
| 315 | elif [ $STATIC = 1 ] ; then |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 316 | STLIB="lib${LIBNAME}.a" |
| 317 | echo "mklib: Making FreeBSD static library: " ${STLIB} |
| 318 | rm -f ${STLIB} |
| 319 | ar cq ${STLIB} ${OBJECTS} |
| 320 | ranlib ${STLIB} |
| 321 | FINAL_LIBS=${STLIB} |
| 322 | else |
| 323 | SHLIB="lib${LIBNAME}.so.${MAJOR}.${MINOR}" |
| 324 | echo "mklib: Making FreeBSD shared library: " ${SHLIB} |
| 325 | rm -f ${SHLIB} |
| 326 | ld -Bshareable -o ${SHLIB} ${OBJECTS} |
| 327 | # XXX make lib${LIBNAME}.so.${MAJOR} symlink? |
| 328 | FINAL_LIBS=${SHLIB} |
| 329 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 330 | ;; |
| 331 | |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 332 | 'NetBSD') |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 333 | if [ $STATIC = 1 ] ; then |
| 334 | LIBNAME="lib${LIBNAME}_pic.a" |
| 335 | echo "mklib: Making NetBSD PIC static library: " ${LIBNAME} |
| 336 | rm -f ${LIBNAME} |
| 337 | ar cq ${LIBNAME} ${OBJECTS} |
| 338 | ranlib ${LIBNAME} |
| 339 | FINAL_LIBS=${LIBNAME} |
| 340 | else |
| 341 | LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}" |
| 342 | echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME} |
| 343 | rm -f ${LIBNAME} |
| 344 | ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS} |
| 345 | FINAL_LIBS=${LIBNAME} |
| 346 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 347 | ;; |
| 348 | |
Brian Paul | f8c31fc | 2004-01-29 15:21:47 +0000 | [diff] [blame] | 349 | 'IRIX' | 'IRIX64') |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 350 | if [ $STATIC = 1 ] ; then |
| 351 | LIBNAME="lib${LIBNAME}.a" |
| 352 | rm -f ${LIBNAME} |
| 353 | ar rc ${LIBNAME} ${OBJECTS} |
| 354 | FINAL_LIBS=${LIBNAME} |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 355 | else |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 356 | LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 357 | # XXX we should run 'file' on the first object file to determine |
| 358 | # if it's o32, n32 or 64 format, as we do for Linux above. |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 359 | if [ $ARCHOPT = "64" ] ; then |
| 360 | # 64-bit ABI |
| 361 | OPTS="-64 -shared -all" |
| 362 | echo "mklib: Making IRIX 64-bit shared library: " ${LIBNAME} |
| 363 | elif [ $ARCHOPT = "o32" ] ; then |
| 364 | # old 32-bit ABI |
| 365 | OPTS="-32 -shared -all" |
| 366 | echo "mklib: Making IRIX o32-bit shared library: " ${LIBNAME} |
| 367 | else |
| 368 | # new 32-bit ABI |
| 369 | OPTS="-n32 -shared -all" |
| 370 | echo "mklib: Making IRIX n32-bit shared library: " ${LIBNAME} |
| 371 | fi |
| 372 | if [ $CPLUSPLUS = 1 ] ; then |
| 373 | LINK="CC" |
| 374 | else |
| 375 | LINK="ld" |
| 376 | fi |
| 377 | ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} |
| 378 | FINAL_LIBS=${LIBNAME} |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 379 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 380 | ;; |
| 381 | |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 382 | 'linux-cygwin') |
| 383 | LIBNAME="lib${LIBNAME}.a" |
| 384 | echo "mklib: Making linux-cygwin library: " ${LIBNAME} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 385 | rm -f ${LIBNAME} |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 386 | gnuwin32ar ruv ${LIBNAME} ${OBJECTS} |
| 387 | FINAL_LIBS=${LIBNAME} |
| 388 | ;; |
| 389 | |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 390 | 'HP-UX') |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 391 | if [ $STATIC = 1 ] ; then |
| 392 | LIBNAME="lib${LIBNAME}.a" |
Brian Paul | 52fb07e | 2004-03-30 14:47:02 +0000 | [diff] [blame] | 393 | echo "mklib: Making HP-UX static library: " ${LIBNAME} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 394 | rm -f ${LIBNAME} |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 395 | ar -ruv ${LIBNAME} ${OBJECTS} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 396 | FINAL_LIBS=${LIBNAME} |
| 397 | else |
| 398 | RUNLIB="lib${LIBNAME}.${MAJOR}" |
| 399 | DEVLIB="lib${LIBNAME}.sl" |
Brian Paul | 52fb07e | 2004-03-30 14:47:02 +0000 | [diff] [blame] | 400 | echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 401 | ld -b -o ${RUNLIB} +b ${RUNLIB} ${OBJECTS} ${DEPS} |
| 402 | ln -s ${RUNLIB} ${DEVLIB} |
Brian Paul | ac0cfee | 2004-04-25 15:13:56 +0000 | [diff] [blame] | 403 | FINAL_LIBS="${RUNLIB} ${DEVLIB}" |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 404 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 405 | ;; |
| 406 | |
Brian Paul | b17a1a1 | 2004-11-01 22:28:42 +0000 | [diff] [blame] | 407 | 'AIX' | 'AIX64') |
| 408 | if [ $ARCH = "AIX64" ] ; then |
| 409 | X64="-X64" |
| 410 | fi |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 411 | |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 412 | if [ $STATIC = 1 ] ; then |
| 413 | LIBNAME="lib${LIBNAME}.a" |
| 414 | echo "mklib: Making AIX static library: " ${LIBNAME} |
Brian Paul | b17a1a1 | 2004-11-01 22:28:42 +0000 | [diff] [blame] | 415 | ar -ruv ${X64} ${LIBNAME} ${OBJECTS} |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 416 | FINAL_LIBS=${LIBNAME} |
| 417 | else |
Karl Schultz | a16bdb5 | 2004-10-01 13:33:26 +0000 | [diff] [blame] | 418 | EXPFILE="lib${LIBNAME}.exp" |
| 419 | OFILE=shr.o #Want to be consistent with the IBM libGL.a |
| 420 | LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries |
Brian Paul | b17a1a1 | 2004-11-01 22:28:42 +0000 | [diff] [blame] | 421 | if [ $ARCH = "AIX64" ] ; then |
| 422 | OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64" |
| 423 | else |
| 424 | OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry" |
| 425 | fi |
Karl Schultz | a16bdb5 | 2004-10-01 13:33:26 +0000 | [diff] [blame] | 426 | rm -f ${EXPFILE} ${OFILE} |
Brian Paul | b17a1a1 | 2004-11-01 22:28:42 +0000 | [diff] [blame] | 427 | NM="/bin/nm -eC ${X64}" |
Karl Schultz | a16bdb5 | 2004-10-01 13:33:26 +0000 | [diff] [blame] | 428 | echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE} |
| 429 | ${NM} ${OBJECTS} | awk '{ |
| 430 | if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \ |
| 431 | && ( substr($1,1,1) != ".")) { |
| 432 | if (substr ($1, 1, 7) != "__sinit" && |
| 433 | substr ($1, 1, 7) != "__sterm") { |
| 434 | if (substr ($1, 1, 5) == "__tf1") |
| 435 | print (substr ($1, 7)) |
| 436 | else if (substr ($1, 1, 5) == "__tf9") |
| 437 | print (substr ($1, 15)) |
| 438 | else |
| 439 | print $1 |
| 440 | } |
| 441 | } |
| 442 | }' | sort -u >> ${EXPFILE} |
| 443 | cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS} |
Brian Paul | b17a1a1 | 2004-11-01 22:28:42 +0000 | [diff] [blame] | 444 | ar ${X64} -r ${LIBNAME} ${OFILE} |
Karl Schultz | a16bdb5 | 2004-10-01 13:33:26 +0000 | [diff] [blame] | 445 | FINAL_LIBS="${LIBNAME}" |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 446 | fi |
| 447 | ;; |
| 448 | |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 449 | 'OpenSTEP') |
| 450 | LIBNAME="lib${LIBNAME}.a" |
| 451 | echo "mklib: Making OpenSTEP static library: " ${LIBNAME} |
| 452 | libtool -static -o ${LIBNAME} - ${OBJECTS} |
| 453 | FINAL_LIBS=${LIBNAME} |
| 454 | ;; |
| 455 | |
| 456 | 'OSF1') |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 457 | if [ $STATIC = 1 ] ; then |
| 458 | LIBNAME="lib${LIBNAME}.a" |
| 459 | echo "mklib: Making OSF/1 static library: " ${LIBNAME} |
| 460 | rm -f ${LIBNAME} |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 461 | ar -ruv ${LIBNAME} ${OBJECTS} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 462 | FINAL_LIBS=${LIBNAME} |
| 463 | else |
| 464 | VERSION="${MAJOR}.${MINOR}" |
| 465 | LIBNAME="lib${LIBNAME}.so" |
| 466 | echo "mklib: Making OSF/1 shared library: " ${LIBNAME} |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 467 | if [ "x$LINK" = "x" ] ; then |
| 468 | if [ $CPLUSPLUS = 1 ] ; then |
| 469 | LINK=cxx |
| 470 | else |
| 471 | LINK=cc |
| 472 | fi |
Brian Paul | 0d5e6cc | 2004-11-29 17:23:12 +0000 | [diff] [blame] | 473 | fi |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 474 | rm -f ${LIBNAME}.${VERSION} |
Brian Paul | 0d5e6cc | 2004-11-29 17:23:12 +0000 | [diff] [blame] | 475 | ${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 476 | ln -sf ${LIBNAME}.${VERSION} ${LIBNAME} |
| 477 | FINAL_LIBS="${LIBNAME} ${LIBNAME}.${VERSION}" |
| 478 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 479 | ;; |
| 480 | |
| 481 | 'Darwin') |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 482 | if [ $STATIC = 1 ] ; then |
| 483 | LIBNAME="lib${LIBNAME}.a" |
| 484 | echo "mklib: Making Darwin static library: " ${LIBNAME} |
| 485 | LINK="ar" |
| 486 | OPTS="-ruv" |
| 487 | ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS} |
| 488 | FINAL_LIBS=${LIBNAME} |
| 489 | else |
Brian Paul | ccda216 | 2005-06-30 02:33:25 +0000 | [diff] [blame] | 490 | LIBNAME="lib${LIBNAME}.dylib" |
Brian Paul | c50d77a | 2004-04-13 17:35:17 +0000 | [diff] [blame] | 491 | echo "mklib: Making Darwin shared library: " ${LIBNAME} |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 492 | FLAGS="-dynamiclib -multiply_defined suppress" |
Brian Paul | c05658d | 2004-03-25 21:18:32 +0000 | [diff] [blame] | 493 | if [ $CPLUSPLUS = 1 ] ; then |
| 494 | LINK="g++" |
| 495 | else |
| 496 | LINK="cc" |
| 497 | fi |
| 498 | ${LINK} ${FLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} |
Brian Paul | aaba075 | 2004-03-23 23:25:47 +0000 | [diff] [blame] | 499 | FINAL_LIBS=${LIBNAME} |
Brian Paul | c193bd0 | 2004-03-18 15:41:59 +0000 | [diff] [blame] | 500 | fi |
| 501 | ;; |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 502 | |
| 503 | 'LynxOS') |
| 504 | LIBNAME="lib${LIBNAME}.a" |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 505 | echo "mklib: Making LynxOS static library: " ${LIBNAME} |
| 506 | rm -f ${LIBNAME} |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 507 | ar ru ${LIBNAME} ${OBJECTS} |
| 508 | FINAL_LIBS=${LIBNAME} |
| 509 | ;; |
| 510 | |
| 511 | 'BeOS') |
Philippe Houdoin | ef4dd5a | 2004-08-14 10:12:38 +0000 | [diff] [blame] | 512 | if [ $STATIC = 1 ] ; then |
| 513 | LIBNAME="lib${LIBNAME}.a" |
| 514 | echo "mklib: Making BeOS static library: " ${LIBNAME} |
| 515 | ar -cru "${LIBNAME}" ${OBJECTS} |
| 516 | else |
Brian Paul | b784b8f | 2004-08-14 14:30:36 +0000 | [diff] [blame] | 517 | LIBNAME="lib${LIBNAME}.so" |
| 518 | echo "mklib: Making BeOS shared library: " ${LIBNAME} |
| 519 | gcc -nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}" |
| 520 | mimeset -f "${LIBNAME}" |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 521 | # XXX remove the Mesa3D stuff here since mklib isn't mesa-specific. |
Brian Paul | b784b8f | 2004-08-14 14:30:36 +0000 | [diff] [blame] | 522 | setversion "${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D!" -long "Powered by Mesa3D!" |
| 523 | fi |
| 524 | FINAL_LIBS=${LIBNAME} |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 525 | ;; |
| 526 | |
| 527 | 'QNX') |
| 528 | LIBNAME="lib${LIBNAME}.a" |
| 529 | echo "mklib: Making QNX library: " ${LIBNAME} |
| 530 | wlib ${LIBNAME} ${OBJECTS} |
| 531 | FINAL_LIBS=${LIBNAME} |
| 532 | ;; |
| 533 | |
Brian Paul | 65e2ab3 | 2003-10-27 18:13:37 +0000 | [diff] [blame] | 534 | 'MorphOS') |
| 535 | LIBNAME="lib${LIBNAME}.a" |
| 536 | echo "mklib: Making MorphOS library: " ${LIBNAME} |
| 537 | ppc-morphos-ar rc ${LIBNAME} ${OBJECTS} |
| 538 | FINAL_LIBS="${LIBNAME}" |
| 539 | ;; |
| 540 | |
Brian Paul | b3b725b | 2003-12-15 16:14:55 +0000 | [diff] [blame] | 541 | 'icc') |
| 542 | # Intel C compiler |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 543 | # This should get merged into the Linux code, above, since this isn't |
| 544 | # really a different architecture. |
Brian Paul | b3b725b | 2003-12-15 16:14:55 +0000 | [diff] [blame] | 545 | LIBNAME="lib${LIBNAME}" # prefix with "lib" |
| 546 | |
| 547 | if [ $STATIC = 1 ] ; then |
| 548 | echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a |
| 549 | LINK="ar" |
| 550 | OPTS="-ruv" |
| 551 | # make lib |
| 552 | ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} |
| 553 | # finish up |
| 554 | FINAL_LIBS="${LIBNAME}.a" |
| 555 | else |
| 556 | OPTS="-shared" |
| 557 | VERSION="${MAJOR}.${MINOR}.${PATCH}" |
Brian Paul | b3b725b | 2003-12-15 16:14:55 +0000 | [diff] [blame] | 558 | echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION} |
| 559 | |
| 560 | if [ $CPLUSPLUS = 1 ] ; then |
| 561 | LINK="icc" |
| 562 | else |
| 563 | LINK="icc" |
| 564 | fi |
Brian Paul | b3b725b | 2003-12-15 16:14:55 +0000 | [diff] [blame] | 565 | # rm any old libs |
| 566 | rm -f ${LIBNAME}.so.${VERSION} |
| 567 | rm -f ${LIBNAME}.so.${MAJOR} |
| 568 | rm -f ${LIBNAME}.so |
Brian Paul | b3b725b | 2003-12-15 16:14:55 +0000 | [diff] [blame] | 569 | # make lib |
| 570 | ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} |
| 571 | # make usual symlinks |
| 572 | ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} |
| 573 | ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so |
| 574 | # finish up |
| 575 | FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so" |
| 576 | fi |
| 577 | ;; |
| 578 | |
Brian Paul | 12d6cae | 2004-01-10 22:12:21 +0000 | [diff] [blame] | 579 | 'aix-gcc') |
| 580 | # AIX with gcc |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 581 | if [ $STATIC = 1 ] ; then |
| 582 | LIBNAME="lib${LIBNAME}.a" |
| 583 | echo "mklib: Making AIX GCC static library: " ${LIBNAME} |
| 584 | rm -f ${LIBNAME} |
| 585 | ar ru ${LIBNAME} ${OBJECTS} |
| 586 | FINAL_LIBS=${LIBNAME} |
| 587 | else |
| 588 | LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" |
| 589 | echo "mklib: Making AIX GCC shared library: " ${LIBNAME} |
| 590 | # remove old lib |
| 591 | rm -f ${LIBNAME} |
| 592 | # make the lib |
| 593 | gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 594 | # NOTE: the application linking with this library must specify |
| 595 | # the -Wl,-brtl flags to gcc |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 596 | FINAL_LIBS=${LIBNAME} |
| 597 | fi |
| 598 | ;; |
| 599 | |
| 600 | 'ultrix') |
| 601 | # XXX untested |
| 602 | if [ $STATIC = 0 ] ; then |
| 603 | echo "mklib: Warning shared libs not supported on Ultrix" |
| 604 | fi |
| 605 | LIBNAME="lib${LIBNAME}.a" |
| 606 | echo "mklib: Making static library for Ultrix: " ${LIBNAME} |
Brian Paul | 12d6cae | 2004-01-10 22:12:21 +0000 | [diff] [blame] | 607 | rm -f ${LIBNAME} |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 608 | ar ru ${LIBNAME} ${OBJECTS} |
| 609 | FINAL_LIBS="${LIBNAME}" |
Brian Paul | 12d6cae | 2004-01-10 22:12:21 +0000 | [diff] [blame] | 610 | ;; |
Brian Paul | b3b725b | 2003-12-15 16:14:55 +0000 | [diff] [blame] | 611 | |
Brian Paul | 580548d | 2004-04-22 16:16:42 +0000 | [diff] [blame] | 612 | CYGWIN*) |
| 613 | # GCC-based environment |
| 614 | CYGNAME="cyg${LIBNAME}" # prefix with "cyg" |
| 615 | LIBNAME="lib${LIBNAME}" # prefix with "lib" |
| 616 | |
| 617 | if [ $STATIC = 1 ] ; then |
| 618 | echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a |
| 619 | LINK="ar" |
| 620 | OPTS="-ru" |
| 621 | # make lib |
| 622 | ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} |
| 623 | ranlib ${LIBNAME}.a |
| 624 | # finish up |
| 625 | FINAL_LIBS=${LIBNAME}.a |
| 626 | else |
| 627 | OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" |
| 628 | echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll |
| 629 | |
| 630 | if [ $CPLUSPLUS = 1 ] ; then |
| 631 | LINK="g++" |
| 632 | else |
| 633 | LINK="gcc" |
| 634 | fi |
| 635 | |
| 636 | # rm any old libs |
| 637 | rm -f ${LIBNAME}-${MAJOR}.dll |
| 638 | rm -f ${LIBNAME}.dll.a |
| 639 | rm -f ${LIBNAME}.a |
| 640 | |
| 641 | # make lib |
| 642 | ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} |
| 643 | # make usual symlinks |
| 644 | ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a |
| 645 | # finish up |
| 646 | FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a" |
| 647 | # special case for installing in bin |
| 648 | FINAL_BINS="${CYGNAME}-${MAJOR}.dll" |
| 649 | fi |
| 650 | ;; |
| 651 | |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 652 | 'example') |
| 653 | # If you're adding support for a new architecture, you can |
| 654 | # start with this: |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 655 | if [ $STATIC = 1 ] ; then |
| 656 | LIBNAME="lib${LIBNAME}.a" |
| 657 | echo "mklib: Making static library for example arch: " ${LIBNAME} |
| 658 | rm -f ${LIBNAME} |
| 659 | ar rv ${LIBNAME} ${OBJECTS} |
| 660 | FINAL_LIBS="${LIBNAME}" |
| 661 | else |
Brian Paul | 7c1ab40 | 2005-07-25 23:49:50 +0000 | [diff] [blame^] | 662 | LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 663 | echo "mklib: Making shared library for example arch: " ${LIBNAME} |
| 664 | ld -o ${LIBNAME} ${OBJECTS} ${DEPS} |
| 665 | FINAL_LIBS="${LIBNAME}" |
| 666 | fi |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 667 | ;; |
| 668 | |
| 669 | *) |
Brian Paul | 5396ab2 | 2004-02-12 14:48:52 +0000 | [diff] [blame] | 670 | echo "mklib: ERROR: Don't know how to make a static/shared library for" ${ARCH} |
| 671 | echo "mklib: Please add necessary commands to mklib script." |
Brian Paul | 8c20c7b | 2003-06-01 16:21:45 +0000 | [diff] [blame] | 672 | ;; |
| 673 | esac |
| 674 | |
| 675 | |
| 676 | # |
| 677 | # Put library files into installation directory if specified. |
| 678 | # |
| 679 | if [ ${INSTALLDIR} != "." ] ; then |
| 680 | echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} |
| 681 | mv ${FINAL_LIBS} ${INSTALLDIR}/ |
| 682 | fi |