now builds libary if required