Windows cross-compilation support for solve_piwi/solve_piwi_bs

This commit is contained in:
Aram
2017-05-04 21:10:06 +02:00
parent 76712e9423
commit 369e300e48
3 changed files with 39 additions and 9 deletions

View File

@ -41,3 +41,31 @@ get_crapto1:
wget http://crapto1.netgarage.org/crapto1-v3.3.tar.xz
mkdir crapto1-v3.3
tar Jxvf crapto1-v3.3.tar.xz -C crapto1-v3.3
# Windows cross compilation
MINGW32 = i686-w64-mingw32-gcc
MINGW64 = x86_64-w64-mingw32-gcc
# solve.c code cannot be compiled on windows without patching the includes
WIN32EXES = solve_piwi_bs32.exe solve_piwi32.exe libnfc_crypto1_crack32.exe
win32: $(WIN32EXES)
win32_clean:
rm -f $(WIN32EXES)
WIN64EXES = solve_piwi_bs64.exe solve_piwi64.exe libnfc_crypto1_crack64.exe
win64: $(WIN64EXES)
win64_clean:
rm -f $(WIN64EXES)
solve_piwi_bs32.exe:
$(MINGW32) $(CFLAGS) solve_piwi_bs.c $(CRYPTO1_BS) $(CRAPTO1) ${CRAPTEV1} -static -m32 -o $@ -lpthread
solve_piwi_bs64.exe:
$(MINGW64) $(CFLAGS) solve_piwi_bs.c $(CRYPTO1_BS) $(CRAPTO1) ${CRAPTEV1} -static -o $@ -lpthread
solve_piwi32.exe:
$(MINGW32) $(CFLAGS) solve_piwi.c $(CRYPTO1_BS) $(CRAPTO1) ${CRAPTEV1} -static -m32 -o $@ -lpthread
solve_piwi64.exe:
$(MINGW64) $(CFLAGS) solve_piwi.c $(CRYPTO1_BS) $(CRAPTO1) ${CRAPTEV1} -static -o $@ -lpthread