diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2012-06-19 00:27:43 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2012-06-19 17:01:59 +0000 |
commit | 093720c53f2c96581989709434d640bc174aa5bb (patch) | |
tree | e7e92fb738114c29f252210d68183495f844044c | |
parent | 511cdd23c5717d0bb98043c154efb4dadc2edbb8 (diff) | |
download | illumos-kvm-cmd-093720c53f2c96581989709434d640bc174aa5bb.tar.gz |
OS-1300 kvm-cmd build system relies on build system headers and libraries
-rwxr-xr-x | build.sh | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -4,7 +4,8 @@ # for dir in seabios vgabios kvm/test; do - cp roms/${dir}/config.mak.tmpl roms/${dir}/config.mak + [[ ! -f roms/${dir}/config.mak.tmpl ]] || \ + cp roms/${dir}/config.mak.tmpl roms/${dir}/config.mak done PNGDIR="${PWD}/libpng-1.5.4" @@ -23,7 +24,9 @@ fi if [[ ! -e ${PNGLIB}/libpng.a ]]; then (cd ${PNGDIR} && \ - LDFLAGS=-m64 CFLAGS=-m64 ./configure --disable-shared && \ + LDFLAGS="-m64 -L${DESTDIR}/usr/lib -L${DESTDIR}/lib" \ + CPPFLAGS="-isystem ${DESTDIR}/usr/include" \ + CFLAGS="-m64" ./configure --disable-shared && \ make && \ mkdir -p ${PNGDIR}/proto && \ make DESTDIR=${PNGDIR}/proto install) @@ -31,11 +34,14 @@ fi echo "==> Running configure" KVM_DIR="${KVM_DIR:-$(cd `pwd`/../kvm; pwd)}" -CC="${CC:-/opt/gcc/4.4.4/bin/gcc}" +CC="${CC:-${DESTDIR}/usr/bin/gcc}" +XCFLAGS="-fno-builtin -I${PNGINC} -isystem ${DESTDIR}/usr/include" +XLDFLAGS="-nodefaultlibs -L${PNGLIB} -L${DESTDIR}/usr/lib -L${DESTDIR}/lib" +XLDFLAGS="${XLDFLAGS} -lz -lm -lc" ./configure \ --cc=$CC \ - --extra-cflags="-fno-builtin -nodefaultlibs -I${PNGDIR}/proto/usr/local/include" \ - --extra-ldflags="-L${PNGDIR}/proto/usr/local/lib -lz -lm -lc" \ + --extra-cflags="${XCFLAGS}" \ + --extra-ldflags="${XLDFLAGS}" \ --prefix=/smartdc \ --audio-card-list= \ --audio-drv-list= \ |