Implement build_cmds function
add library