diff --git a/GNUmakefile b/GNUmakefile index 79dee7b2..7b55d800 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -239,13 +239,13 @@ selfexec: ol # require mingw-w64-i686-dev (+ gcc-mingw-w64-i686) or/and mingw-w64-x86-64-dev (+ gcc-mingw-w64-x86-64) %.exe: MINGWCFLAGS += -std=gnu99 -fno-exceptions %.exe: MINGWCFLAGS += -Wno-shift-count-overflow -%.exe: MINGWCFLAGS += -DHAVE_DLOPEN=1 -%.exe: MINGWCFLAGS += -DHAS_SOCKES=1 %.exe: MINGWCFLAGS += $(CFLAGS_RELEASE) %.exe: src/olvm.c extensions/ffi.c tmp/repl.c - $(CC) src/olvm.c tmp/repl.c -o $@ \ - -DREPL=repl -DOLVM_FFI=1 \ - -Iincludes -Iincludes/win32 extensions/ffi.c \ + x86_64-w64-mingw32-gcc \ + $^ -o $@ \ + -DREPL=repl \ + -DHAVE_DLOPEN=1 -DHAS_SOCKES=1 -DOLVM_FFI=1 \ + -Iincludes/win32 -Iincludes \ $(MINGWCFLAGS) -lws2_32 # compiling the Ol language diff --git a/tests/Makefile b/tests/Makefile index 6c2cde86..4b1182fb 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -19,6 +19,7 @@ HAS_MINGW64 ?= $(call which,x86_64-w64-mingw32-gcc) # dpkg --add-architecture i386 && apt-get update # apt install wine32 HAS_WINE ?= $(call which,wine) +WINE ?= wine cmd /c # notifications ok:="$(green) ok $(done)" @@ -391,12 +392,12 @@ ifeq ($(HAS_64CDEFS),1) $(call scmtestok,$(vm)r64,release-64) endif ifeq ($(HAS_MINGW32)$(HAS_WINE),11) - $(call scmtestok,$(vm)32d.exe,win-debug-32,wine,--strip-trailing-cr) - $(call scmtestok,$(vm)32r.exe,win-release-32,wine,--strip-trailing-cr) + $(call scmtestok,$(vm)32d.exe,win-debug-32,$(WINE),--strip-trailing-cr) + $(call scmtestok,$(vm)32r.exe,win-release-32,$(WINE),--strip-trailing-cr) endif ifeq ($(HAS_MINGW64)$(HAS_WINE),11) - $(call scmtestok,$(vm)64d.exe,win-debug-64,wine,--strip-trailing-cr) - $(call scmtestok,$(vm)64r.exe,win-release-64,wine,--strip-trailing-cr) + $(call scmtestok,$(vm)64d.exe,win-debug-64,$(WINE),--strip-trailing-cr) + $(call scmtestok,$(vm)64r.exe,win-release-64,$(WINE),--strip-trailing-cr) endif else # default case $(call scmtestok,$(vm)d,debug) @@ -427,12 +428,12 @@ ifeq ($(HAS_64CDEFS),1) $(call bintestok,$(vm)r64,release-64) endif ifeq ($(HAS_MINGW32)$(HAS_WINE),11) - $(call bintestok,$(vm)32d.exe,win-debug-32,wine,--strip-trailing-cr) - $(call bintestok,$(vm)32r.exe,win-release-32,wine,--strip-trailing-cr) + $(call bintestok,$(vm)32d.exe,win-debug-32,$(WINE),--strip-trailing-cr) + $(call bintestok,$(vm)32r.exe,win-release-32,$(WINE),--strip-trailing-cr) endif ifeq ($(HAS_MINGW64)$(HAS_WINE),11) - $(call bintestok,$(vm)64d.exe,win-debug-64,wine,--strip-trailing-cr) - $(call bintestok,$(vm)64r.exe,win-release-64,wine,--strip-trailing-cr) + $(call bintestok,$(vm)64d.exe,win-debug-64,$(WINE),--strip-trailing-cr) + $(call bintestok,$(vm)64r.exe,win-release-64,$(WINE),--strip-trailing-cr) endif else # default case $(call bintestok,$(vm)d,debug)