#!/bin/sh

ANDROID_ROOT=$HOME/android/source/cupcake && PATH="$ANDROID_ROOT/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin:$PATH" ./configure --host=arm-linux CC=arm-eabi-gcc CPPFLAGS="-I $ANDROID_ROOT/system/core/include   -I $ANDROID_ROOT/hardware/libhardware/include   -I $ANDROID_ROOT/hardware/libhardware_legacy/include   -I $ANDROID_ROOT/hardware/ril/include   -I $ANDROID_ROOT/dalvik/libnativehelper/include   -I $ANDROID_ROOT/frameworks/base/include   -I $ANDROID_ROOT/frameworks/base/opengl/include   -I $ANDROID_ROOT/external/skia/include   -I $ANDROID_ROOT/out/target/product/generic/obj/include   -I $ANDROID_ROOT/bionic/libc/arch-arm/include   -I $ANDROID_ROOT/bionic/libc/include   -I $ANDROID_ROOT/bionic/libstdc++/include   -I $ANDROID_ROOT/bionic/libc/kernel/common   -I $ANDROID_ROOT/bionic/libc/kernel/arch-arm   -I $ANDROID_ROOT/bionic/libm/include   -I $ANDROID_ROOT/bionic/libm/include/arch/arm   -I $ANDROID_ROOT/bionic/libthread_db/include   -I $ANDROID_ROOT/external/curl/include/   -I $ANDROID_ROOT/external/curl   -I $ANDROID_ROOT/out/target/product/generic/obj/STATIC_LIBRARIES/libcurl_intermediates" CFLAGS="-nostdlib -fno-exceptions -Wno-multichar -msoft-float -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -march=armv5te -mtune=xscale -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -include $ANDROID_ROOT/system/core/include/arch/linux-arm/AndroidConfig.h -I $ANDROID_ROOT/system/core/include/arch/linux-arm/ -mthumb-interwork -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -DSK_RELEASE -DNDEBUG -g -Wstrict-aliasing=2 -finline-functions -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -DNDEBUG -UDEBUG -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64   -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers" LIBS="$ANDROID_ROOT/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a $ANDROID_ROOT/out/target/product/generic/obj/lib/crtbegin_dynamic.o $ANDROID_ROOT/out/target/product/generic/obj/lib/crtend_android.o -Bdynamic -Wl,-T,$ANDROID_ROOT/build/core/armelf.x -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,--no-undefined -L$ANDROID_ROOT/out/target/product/generic/obj/lib -Wl,-rpath-link=out/target/product/generic/obj/lib -lc -lstdc++ -lcutils -lm -ldl -llog -L$ANDROID_ROOT/out/target/product/generic/system/lib" 
