build: module: Add archiving support

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