Compare commits
2
Commits
d80ebec12c
...
9f8a27068a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f8a27068a | ||
|
|
91e348311a |
No files matched your search
@@ -0,0 +1,12 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `build.sh`: `uname -s` exported once and reused by make instead of being re-run
|
||||||
|
- `gmake.mk`: stopped relying on the `OS` env var alone (unset under MSYS2), now also detects Windows via `uname -s` (`MINGW*`/`MSYS*`/`UCRT*`/`CLANG*`/`CYGWIN*`), with the native-Windows `cmd.exe` mkdir/rd path reserved for environments without a POSIX shell; fixes MSYS2 builds silently falling through to the Linux `mkdir -p`/`rm -rf` path mismatch
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
UNAME_S=$(uname -s)
|
||||||
|
export UNAME_S
|
||||||
|
|
||||||
|
OS=$(echo "$UNAME_S" | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
if [ "$OS" = "freebsd" ]; then
|
if [ "$OS" = "freebsd" ]; then
|
||||||
MK_FILE="bmake.mk"
|
MK_FILE="bmake.mk"
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(UNAME_S),)
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter MINGW% MSYS% UCRT% CLANG% CYGWIN%,$(UNAME_S)))
|
||||||
|
IS_WINDOWS := 1
|
||||||
|
IS_POSIX_SHELL := 1
|
||||||
|
else ifeq ($(OS),Windows_NT)
|
||||||
|
IS_WINDOWS := 1
|
||||||
|
IS_POSIX_SHELL :=
|
||||||
|
else
|
||||||
|
IS_WINDOWS :=
|
||||||
|
IS_POSIX_SHELL := 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(IS_WINDOWS),1)
|
||||||
CLOCK_SRC := src/platform/clock/win32.c
|
CLOCK_SRC := src/platform/clock/win32.c
|
||||||
INPUT_SRC := src/platform/client/input/sdl.c
|
INPUT_SRC := src/platform/client/input/sdl.c
|
||||||
else
|
else
|
||||||
@@ -19,8 +33,7 @@ LIBSKELE_SRCS := $(ENGINE_SRCS) $(SOFT_PLAT_SRCS)
|
|||||||
LIBGLSKELE_SRCS := $(ENGINE_SRCS) $(GL_PLAT_SRCS)
|
LIBGLSKELE_SRCS := $(ENGINE_SRCS) $(GL_PLAT_SRCS)
|
||||||
LIBSKELE_SRV_SRCS := $(ENGINE_SRCS)
|
LIBSKELE_SRV_SRCS := $(ENGINE_SRCS)
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(IS_WINDOWS),1)
|
||||||
SHELL := cmd.exe
|
|
||||||
LIBSKELE := $(BIN_DIR)/debug/libskele.a
|
LIBSKELE := $(BIN_DIR)/debug/libskele.a
|
||||||
LIBGLSKELE := $(BIN_DIR)/debug/libglskele.a
|
LIBGLSKELE := $(BIN_DIR)/debug/libglskele.a
|
||||||
LIBSKELE_SRV := $(BIN_DIR)/debug/libskeleserver.a
|
LIBSKELE_SRV := $(BIN_DIR)/debug/libskeleserver.a
|
||||||
@@ -35,8 +48,6 @@ ifeq ($(OS),Windows_NT)
|
|||||||
SERVER_BIN_R := $(BIN_DIR)/release/skele_server.exe
|
SERVER_BIN_R := $(BIN_DIR)/release/skele_server.exe
|
||||||
LDFLAGS_PLAT :=
|
LDFLAGS_PLAT :=
|
||||||
CFLAGS_PLAT :=
|
CFLAGS_PLAT :=
|
||||||
MKDIR = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
|
||||||
RMDIR = if exist $(subst /,\,$(1)) rd /s /q $(subst /,\,$(1))
|
|
||||||
else
|
else
|
||||||
LIBSKELE := $(BIN_DIR)/debug/libskele.a
|
LIBSKELE := $(BIN_DIR)/debug/libskele.a
|
||||||
LIBGLSKELE := $(BIN_DIR)/debug/libglskele.a
|
LIBGLSKELE := $(BIN_DIR)/debug/libglskele.a
|
||||||
@@ -52,11 +63,18 @@ else
|
|||||||
SERVER_BIN_R := $(BIN_DIR)/release/skele_server
|
SERVER_BIN_R := $(BIN_DIR)/release/skele_server
|
||||||
LDFLAGS_PLAT :=
|
LDFLAGS_PLAT :=
|
||||||
CFLAGS_PLAT :=
|
CFLAGS_PLAT :=
|
||||||
MKDIR = mkdir -p $(1)
|
|
||||||
RMDIR = rm -rf $(1)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(IS_POSIX_SHELL),1)
|
||||||
|
MKDIR = mkdir -p $(1)
|
||||||
|
RMDIR = rm -rf $(1)
|
||||||
|
else
|
||||||
|
SHELL := cmd.exe
|
||||||
|
MKDIR = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||||
|
RMDIR = if exist $(subst /,\,$(1)) rd /s /q $(subst /,\,$(1))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(IS_WINDOWS),1)
|
||||||
GL_LIB := -lopengl32
|
GL_LIB := -lopengl32
|
||||||
LDFLAGS_PLAT :=
|
LDFLAGS_PLAT :=
|
||||||
CFLAGS_PLAT :=
|
CFLAGS_PLAT :=
|
||||||
|
|||||||
Reference in new issue
Block a user