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