Skip to content

Commit 81f2759

Browse files
committed
fix: Improve MSYS2 platform detection in makefile
- Use MSYSTEM environment variable instead of uname for MSYS2 detection - Fix incorrect macOS build type being used on Windows - Ensure proper include paths for SDL2 headers in MSYS2
1 parent 0fe04be commit 81f2759

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

source/makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ UNAME_S := $(shell uname -s)
4848
UNAME_M := $(shell uname -m)
4949

5050
# Platform detection and configuration
51-
ifneq (,$(findstring NT-,$(UNAME_S)))
51+
ifneq (,$(findstring MINGW,$(MSYSTEM)))
5252
# Windows (MSYS2/MinGW) configuration
5353
PLATFORM = windows
5454
BUILD_TYPE = Windows (SDL2/MinGW)
55+
else ifneq (,$(findstring MINGW,$(shell uname -s)))
56+
# Windows (MSYS2/MinGW) configuration through other environments
57+
PLATFORM = windows
58+
BUILD_TYPE = Windows (SDL2/MinGW)
5559
ARCH_FLAGS =
5660

5761
# Windows-specific paths and flags

0 commit comments

Comments
 (0)