File: mklib.glide

package info (click to toggle)
mesa 3.1-17
  • links: PTS
  • area: main
  • in suites: potato
  • size: 10,908 kB
  • ctags: 19,599
  • sloc: ansic: 132,736; asm: 10,554; sh: 9,193; cpp: 3,540; makefile: 1,377
file content (79 lines) | stat: -rwxr-xr-x 1,742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh

# Make a Linux ELF shared library, including 3Dfx Glide libs

#--identification------------------------------------------------------

# $Id: mklib.glide,v 1.2.2.2 1999/11/30 12:59:17 brianp Exp $

# $Log: mklib.glide,v $
# Revision 1.2.2.2  1999/11/30 12:59:17  brianp
# restored MAJOR version number in soname
#
# Revision 1.2.2.1  1999/11/18 15:31:08  brianp
# removed MAJOR version number from soname
#
# Revision 1.2  1999/09/15 15:10:20  brianp
# added third, tiny version number to arguments
#
# Revision 1.1  1999/08/19 13:53:00  brianp
# initial check-in (post-crash)
#


#--common--------------------------------------------------------------

LIBRARY=$1
shift 1

MAJOR=$1
shift 1

MINOR=$1
shift 1

TINY=$1
shift 1

OBJECTS=$*

#--platform------------------------------------------------------------

if [ $LIBRARY = "libMesaGL.so" ] ; then
    GLIDELIBS="-L/usr/local/glide/lib -lglide2x -lm"
fi


# the following provided by Thomas Hiller (Hiller@tu-harburg.d400.de)

VERSION="${MAJOR}.${MINOR}"

LIBNAME=`basename $LIBRARY`
ARNAME=`basename $LIBNAME .so`.a
DIRNAME=`dirname $LIBRARY`

gcc -shared -Wl,-soname,${LIBNAME}.${MAJOR} -o ${LIBRARY}.${VERSION} ${OBJECTS} ${GLIDELIBS}
(cd $DIRNAME; ln -s ${LIBNAME}.${VERSION} ${LIBNAME}.${MAJOR})

ln -s ${LIBNAME}.${MAJOR} ${LIBRARY}


# also make regular .a files,
# provided by Danek Duvall (duvall@dhduvall.student.princeton.edu)

ar ruv ${DIRNAME}/${ARNAME} ${OBJECTS}
ranlib ${DIRNAME}/${ARNAME}


# Print a reminder about shared libs:
DIR=`cd .. ; pwd`
echo
echo "******Be sure to add" ${DIR}"/lib to your LD_LIBRARY_PATH variable"
echo
sleep 2



#### NOTES:
# One Mesa user reports having to run the "ldconfig -v" command to make
# Linux aware of the shared libs.