--- Makefile.cross-linux-mingw 2017-12-11 17:46:55.000000000 +0100 +++ Makefile.cross-linux-mingw.modified 2019-07-09 21:24:24.103504850 +0200 @@ -53,7 +53,12 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer endif endif +ifdef STATICBUILD +# cheating a bit to get through +C_COMPILER_SHARED_OPTIONS = -DPIC -DC_BUILDING_LIBCHICKEN +else C_COMPILER_SHARED_OPTIONS = -DPIC +endif LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared LIBRARIES = -lm -lws2_32 LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).dll.a