build: Add common rule for sources shared between daemon and library