Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ default: all
# If you are using WSL, it is recommended you build with NOWINE=1.
WSLENV ?= no
ifeq ($(WSLENV),no)
NOWINE = 0
NOWINE = 0
else
NOWINE = 1
# As of build 17063, WSLENV is defined in both WSL1 and WSL2
# so we need to use the kernel release to detect between
# the two.
UNAME_R := $(shell uname -r)
ifeq ($(findstring WSL2,$(UNAME_R)),)
NOWINE = 1
else
NOWINE = 0
endif
endif

ifeq ($(OS),Windows_NT)
Expand All @@ -50,7 +58,10 @@ endif
endif

ifeq ($(NOWINE),1)
WINE :=
WINE :=
WINPATH := wslpath
else
WINPATH := winepath
endif

################ Target Executable and Sources ###############
Expand Down