forked from pret/pmd-sky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatform.mk
46 lines (43 loc) · 789 Bytes
/
platform.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
WSLENV ?= no
ifeq ($(WSLENV),no)
NOWINE = 0
else
# 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)
EXE := .exe
WINE :=
GREP := grep -P
SED := sed -r
SHA1SUM := sha1sum
MKTEMP := mktemp
else
EXE :=
WINE := wine
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
GREP := grep -E
SED := gsed -r
SHA1SUM := shasum
MKTEMP := gmktemp
else
GREP := grep -P
SED := sed -r
SHA1SUM := sha1sum
MKTEMP := mktemp
endif
endif
ifeq ($(NOWINE),1)
WINE :=
WINPATH := wslpath
else
WINPATH := winepath
endif