Fix make bugs and change static file basename get way

use basename api to get basename of file