build rgl library