make a seperately compilable library (in newmat)