These instructions for building SQLite with MinGW on windows. More detailed explanation is found at Compiled .exe is standalone and does not require the .dll.
cd sqlite
mkdir bld; cd bld
../configure --disable-tcl
make target_source
cd tsrc
mv tclsqlite.c tclsqlite.c.unused
gcc -O2 -DNDEBUG=1 -DTHREADSAFE=1 -c *.c
gcc -s -o sqlite3 *.o
rm shell.o
gcc -shared -s -o sqlite3.dll *.o *.def -Wl,--out-implib,libsqlite.dll.a
mkdir ../release
cp sqlite3.dll sqlite3.exe libsqlite3.dll.a sqlite3.h ../release
cd ../release