separate out library compilation