#!/bin/sh

source ../Config.sh

# This is a debug tool: Do not build it for a final firmware
[ "$PP_BUILD_TYPE" = "final" ] && exit 0

pp_build_local () {
    # force configure
    if [ "$PP_FORCE_FULL_BUILD" = "1" ]; then
	rm -f defines.h
    fi

    # configure
    if [ ! -f defines.h ]; then
	echo "Running configure ..."
	./configure
    fi

    # make / install
    make install
}

pp_do "$@"
