2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2010-2014 Intel Corporation
5 # Auto-generate a Makefile in build directory
7 # $1: path of project src root
8 # $2: path of build dir (can be relative to $1)
10 echo "# Automatically generated by gen-build-mk.sh"
13 echo "ifeq (\"\$(origin O)\", \"command line\")"
14 echo "\$(error \"Cannot specify O= as you are already in a build directory\")"
18 echo "MAKEFLAGS += --no-print-directory"
21 echo " @\$(MAKE) -C $1 O=$2"
24 echo " @\$(MAKE) -C $1 O=$2 \$@"