summaryrefslogtreecommitdiff
path: root/lzo/B/generic/build_gcc.sh
blob: 179d8c0fcb46d250bbda6b1dc0edc5ad2b567228 (plain)
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
#! /bin/sh
# vi:ts=4:et
set -e
echo "// Using GNU C compiler."
echo "//"

test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../..
UNAME_MACHINE=unknown

CC="gcc -fPIC"
CC="gcc -static"
CC="gcc"
CFLAGS="-Wall -O2 -fomit-frame-pointer"

# delete the next line to disable assembler support
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
case $UNAME_MACHINE in
    i[34567]86)
        CC="$CC -m32"
        CPPFLAGS="-DLZO_USE_ASM"
        LZO_EXTRA_SOURCES=$top_srcdir/asm/i386/src_gas/*.S
        ;;
esac

. $top_srcdir/B/generic/build.sh