Does anyone know of a good C or fortran library which constructs the rotation matrix to convert from ECI to ECEF components?
The IAU’s Standards of Fundamental Astronomy (SOFA) library has a ANSI C and FORTRAN version.
See the documentation on the C2T06A function for converting from ECI to ECEF.
You must look up what are called Earth Orientation Parameters (EOP) if you wish to convert ECI coordinates to ECEF. You can find them here.