#!/bin/sh

TARGETS=(
	"debug"
	"release"
	"sdram_debug"
	"sdram_release"
	"flexspi_nor_debug"
	"flexspi_nor_release"
)

bash clean.sh

for TARGET in "${TARGETS[@]}" ; do
	ENV=${TARGET} bash build.sh $@
	RET=$?
	if [[ ! 0 -eq ${RET} ]]; then
		exit ${RET}
	fi
done
