"Fossies" - the Fresh Open Source Software Archive

Member "mapm_4.9.5a/make_linux_shared_lib" (21 Feb 2010, 1020 Bytes) of package /linux/misc/old/mapm-4.9.5a.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 	#  
    2 	#
    3 #
    4 #  short script to build a Linux shared library. 
    5 #
    6 #  fix as needed for your system,
    7 #  this works on my Linux system.
    8 #
    9 #
   10 #  The shared library (libmapm.so.0) will need to be copied to
   11 #  a directory where the run time loader knows where to look,
   12 #  like '/usr/lib'. Typically, this would be copied to 'usr/local/lib'
   13 #  and symbolic links set in '/usr/lib'. If you don't know what 
   14 #  this means, then just copy libmapm.so.0 to '/usr/lib'. Also 
   15 #  create another file called libmapm.so. Then you will be able
   16 #  to link with '-lmapm' on the gcc command line and this library
   17 #  will be used at run-time.
   18 #
   19 #  for example, to build the application 'calc' :
   20 #
   21 #  gcc -Wall -O2 -o calc calc.c -s -lmapm -lm
   22 #
   23 #
   24 rm -f map*.o libmapm.so.0
   25 #
   26 #
   27 #  compile MAPM with position independent code (-fPIC)
   28 #
   29 echo 'Compile MAPM library ...'
   30 gcc -c -Wall -O2 -fPIC map*.c
   31 #
   32 #
   33 #   build the shared library : libmapm.so.0
   34 #
   35 echo 'Build Shared Library libmapm.so.0 ...'
   36 gcc -shared -o libmapm.so.0 map*.o
   37 #
   38 rm -f map*.o
   39 #
   40 #