WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
File tree Expand file tree Collapse file tree 7 files changed +60
-15
lines changed
Expand file tree Collapse file tree 7 files changed +60
-15
lines changed Original file line number Diff line number Diff line change 5959
6060ifeq ($(NOWINE ) ,1)
6161 WINE :=
62- WINPATH := wslpath
63- else
64- WINPATH := winepath
6562endif
6663
6764# ############### Target Executable and Sources ###############
Original file line number Diff line number Diff line change @@ -23,9 +23,17 @@ default: all
2323# If you are using WSL, it is recommended you build with NOWINE=1.
2424WSLENV ?= no
2525ifeq ($(WSLENV ) ,no)
26- NOWINE = 0
26+ NOWINE = 0
2727else
28- NOWINE = 1
28+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
29+ # so we need to use the kernel release to detect between
30+ # the two.
31+ UNAME_R := $(shell uname -r)
32+ ifeq ($(findstring WSL2,$(UNAME_R)),)
33+ NOWINE = 1
34+ else
35+ NOWINE = 0
36+ endif
2937endif
3038
3139ifeq ($(OS ) ,Windows_NT)
Original file line number Diff line number Diff line change @@ -25,9 +25,17 @@ default: all
2525# If you are using WSL, it is recommended you build with NOWINE=1.
2626WSLENV ?= no
2727ifeq ($(WSLENV ) ,no)
28- NOWINE = 0
28+ NOWINE = 0
2929else
30- NOWINE = 1
30+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
31+ # so we need to use the kernel release to detect between
32+ # the two.
33+ UNAME_R := $(shell uname -r)
34+ ifeq ($(findstring WSL2,$(UNAME_R)),)
35+ NOWINE = 1
36+ else
37+ NOWINE = 0
38+ endif
3139endif
3240
3341ifeq ($(OS ) ,Windows_NT)
Original file line number Diff line number Diff line change 88# If you are using WSL, it is recommended you build with NOWINE=1.
99WSLENV ?= no
1010ifeq ($(WSLENV ) ,no)
11- NOWINE = 0
11+ NOWINE = 0
1212else
13- NOWINE = 1
13+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
14+ # so we need to use the kernel release to detect between
15+ # the two.
16+ UNAME_R := $(shell uname -r)
17+ ifeq ($(findstring WSL2,$(UNAME_R)),)
18+ NOWINE = 1
19+ else
20+ NOWINE = 0
21+ endif
1422endif
1523
1624ifeq ($(OS ) ,Windows_NT)
Original file line number Diff line number Diff line change 88# If you are using WSL, it is recommended you build with NOWINE=1.
99WSLENV ?= no
1010ifeq ($(WSLENV ) ,no)
11- NOWINE = 0
11+ NOWINE = 0
1212else
13- NOWINE = 1
13+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
14+ # so we need to use the kernel release to detect between
15+ # the two.
16+ UNAME_R := $(shell uname -r)
17+ ifeq ($(findstring WSL2,$(UNAME_R)),)
18+ NOWINE = 1
19+ else
20+ NOWINE = 0
21+ endif
1422endif
1523
1624ifeq ($(OS ) ,Windows_NT)
Original file line number Diff line number Diff line change 88# If you are using WSL, it is recommended you build with NOWINE=1.
99WSLENV ?= no
1010ifeq ($(WSLENV ) ,no)
11- NOWINE = 0
11+ NOWINE = 0
1212else
13- NOWINE = 1
13+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
14+ # so we need to use the kernel release to detect between
15+ # the two.
16+ UNAME_R := $(shell uname -r)
17+ ifeq ($(findstring WSL2,$(UNAME_R)),)
18+ NOWINE = 1
19+ else
20+ NOWINE = 0
21+ endif
1422endif
1523
1624ifeq ($(OS ) ,Windows_NT)
Original file line number Diff line number Diff line change 88# If you are using WSL, it is recommended you build with NOWINE=1.
99WSLENV ?= no
1010ifeq ($(WSLENV ) ,no)
11- NOWINE = 0
11+ NOWINE = 0
1212else
13- NOWINE = 1
13+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
14+ # so we need to use the kernel release to detect between
15+ # the two.
16+ UNAME_R := $(shell uname -r)
17+ ifeq ($(findstring WSL2,$(UNAME_R)),)
18+ NOWINE = 1
19+ else
20+ NOWINE = 0
21+ endif
1422endif
1523
1624ifeq ($(OS ) ,Windows_NT)
You can’t perform that action at this time.
0 commit comments