build: module: Add linking support

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>