aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--build_msvc.bat9
2 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index 02fbb47..7fc784b 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ See `passgen --help` for details.
$ make
# Windows, in Developer CMD
-$ cl /std:c11 passgen.c /link Advapi32.lib
+$ build_msvc.bat
```
NOTE: Compilation with mingw will use the fallback RNG for password generation. This utilises `rand()` in C, seeded with the time and PID - may be unsafe! On Windows with `cl`, \*nix, macOS, Free/OpenBSD, the relevant system calls will be utilised to get better quality randomness. See the `_rng` functions for details.
diff --git a/build_msvc.bat b/build_msvc.bat
new file mode 100644
index 0000000..e0eb676
--- /dev/null
+++ b/build_msvc.bat
@@ -0,0 +1,9 @@
+@echo off
+rem -- RUN FROM DEVELOPER CMD FOR VS!! --
+
+rem /W4 used because /Wall is too much...
+set CFLAGS=/W4 /FC /nologo
+rem Link for wincrypt support
+set LIBS=Advapi32.lib
+
+cl %CFLAGS% passgen.c /link %LIBS% \ No newline at end of file