RE: Partial success building on the Windows MSYS2 environ... ยป environment.patch
| makefile | ||
|---|---|---|
|
# environment & toolchain
|
||
|
ifdef windir
|
||
|
ifndef environment
|
||
|
CP := copy
|
||
|
RM := del
|
||
|
TC := type nul >
|
||
|
PRG := .exe
|
||
|
DIR = $(subst /,\,$1)
|
||
|
DIRP = $(subst /,\\,$1)
|
||
|
ESC = $(strip $1)
|
||
|
NUL := nul
|
||
|
ENVIRONMENT := windows.cpp
|
||
|
ifdef CommonProgramFiles(x86)
|
||
|
HOSTENVIRONMENTS := win32 win64
|
||
|
ifdef MSYSTEM
|
||
|
environment := posix
|
||
|
else ifdef windir
|
||
|
environment := windows
|
||
|
else
|
||
|
HOSTENVIRONMENTS := dos win32
|
||
|
environment := posix
|
||
|
endif
|
||
|
ifndef toolchain
|
||
|
toolchain := msvc
|
||
|
endif
|
||
|
endif
|
||
|
else
|
||
|
ifeq "$(environment)" "posix"
|
||
|
CP := cp -f
|
||
|
RM := rm -f
|
||
| ... | ... | |
|
endif
|
||
|
else
|
||
|
ENVIRONMENT := $(error unknown host environment)
|
||
|
ENVIRONMENT := $(error unknown posix environment)
|
||
|
endif
|
||
|
else ifeq "$(environment)" "windows"
|
||
|
CP := copy
|
||
|
RM := del
|
||
|
TC := type nul >
|
||
|
PRG := .exe
|
||
|
DIR = $(subst /,\,$1)
|
||
|
DIRP = $(subst /,\\,$1)
|
||
|
ESC = $(strip $1)
|
||
|
NUL := nul
|
||
|
ENVIRONMENT := windows.cpp
|
||
|
ifdef CommonProgramFiles(x86)
|
||
|
HOSTENVIRONMENTS := win32 win64
|
||
|
else
|
||
|
HOSTENVIRONMENTS := dos win32
|
||
|
endif
|
||
|
ifndef toolchain
|
||
|
toolchain := msvc
|
||
|
endif
|
||
|
else
|
||
|
ENVIRONMENT := $(error unknown environment)
|
||
|
endif
|
||
|
ifeq "$(toolchain)" "ecs"
|
||