In addition to being used for the SHA-256 algorithm, the same code also performs the SHA-224 algorithm. In fact, the SHA-224 hash algorithm is nothing more than the result of the SHA-256 algorithm being cut short.

The code only has a single dependency on config.h in the sha256.c source code file. You can remove this inclusion or just create a simple header file to define one or more of the configuration options that the SHA-256 source code has.