@echo off

set PROJECT_DIR=%cd%\script\%PLAT%\%PROJECT_NAME%
set HEZHOU_SDK_DIR=%cd%\bsp\hezhou\sdk\luatos-soc-2023

if not "%1"=="" (
	set PROJECT_NAME=%1
) ELSE (
	@echo PROJECT not set
)

@echo PROJECT : %PROJECT_NAME%  

cd /d %HEZHOU_SDK_DIR%

if not exist xmake.lua (
	echo xmake.lua not exist
	goto end
)
call xmake f -c
call xmake clean -a
call del /Q .xmake

:end
echo done

