strip_fPIC.sh
author Sam Lantinga <slouken@lokigames.com>
Thu, 26 Apr 2001 16:45:43 +0000
changeset 0 74212992fb08
child 1 cf2af46e9e2a
permissions -rwxr-xr-x
Initial revision
slouken@0
     1
#!/bin/sh
slouken@0
     2
#
slouken@0
     3
# libtool assumes that the compiler can handle the -fPIC flag
slouken@0
     4
# This isn't always true (for example, nasm can't handle it)
slouken@0
     5
command=""
slouken@0
     6
while [ $1 ]; do
slouken@0
     7
    if [ "$1" != "-fPIC" ]; then
slouken@0
     8
        if [ "$1" != "-DPIC" ]; then
slouken@0
     9
            command="$command $1"
slouken@0
    10
        fi
slouken@0
    11
    fi
slouken@0
    12
    shift
slouken@0
    13
done
slouken@0
    14
echo $command
slouken@0
    15
exec $command