Build libgenlock

Signed-off-by: Nathan Chan <e334cn@gmail.com>