The below patch to the My Certificate Wizard makefile attempts to determine whether a cross-compiler is available, and uses it if possible. I'd like to see it applied, such that both folks on win32 and *nix can use the same makefile w/o needing to twiddle it after checkout.
I haven't tested it on native win32; if the CROSSFOUND variable's determination doesn't work in your environment, I'd appreciate any suggestions wrt a better approach. Thanks! (Like my other non-private changes, this is available via GNU Arch; it can either be checked out or branched from my archive, or just browsed via the web address below once these changes get pulled by sourcecontrol.net). http://archzoom.sourcecontrol.net/demo/cdu...@spamcop.net--2004/mycert--fixes--0.3 --- orig/Makefile +++ mod/Makefile @@ -15,14 +15,19 @@ OBJS = mycert.o request.o misc.o mycert-res.o customize.o +CROSSTGT := i586-mingw32msvc +CROSSFOUND := $(shell which ${CROSSTGT}-gcc 2>/dev/null >/dev/null && echo YES || echo NO ) + +ifeq (${CROSSFOUND},YES) + ## Cross-compiling + CC = ${CROSSTGT}-gcc + WINDRES = ${CROSSTGT}-windres +else + ## For Windows using the mingw/msys environment + CC = gcc + WINDRES = windres +endif -## For Windows using the mingw/msys environment -CC = gcc -WINDRES = windres - -## Cross-compiling from Debian -#CC = i586-mingw32msvc-gcc -#WINDRES = i586-mingw32msvc-windres CFLAGS = -DREGULAR_EXPRESSIONS -O3 -Wall -Wno-unused-function -Wno-unused-variable -mno-cygwin LDFLAGS = -mwindows -s -leay32