Add static support.

@valera-rozuvan  please review