Compare commits
2
Commits
main
...
98633cf134
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98633cf134 | ||
|
|
e143adca2b |
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# 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/).
|
||||
This template is copied into new games rather than versioned/released itself,
|
||||
so entries here track the template's own history, not a game built from it.
|
||||
|
||||
## [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
|
||||
|
||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
UNAME_S=$(uname -s)
|
||||
export UNAME_S
|
||||
|
||||
OS=$(echo "$UNAME_S" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [ "$OS" = "freebsd" ]; then
|
||||
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
|
||||
else
|
||||
CLOCK_SRC := src/platform/clock/posix.c
|
||||
@@ -6,8 +20,7 @@ endif
|
||||
|
||||
include config.mk
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
SHELL := cmd.exe
|
||||
ifeq ($(IS_WINDOWS),1)
|
||||
GL_LIB := -lopengl32
|
||||
LDFLAGS_PLAT :=
|
||||
CFLAGS_PLAT :=
|
||||
@@ -16,8 +29,6 @@ ifeq ($(OS),Windows_NT)
|
||||
CLIENT_BIN := $(GAME_NAME)_client.exe
|
||||
GLCLIENT_BIN := $(GAME_NAME)_glclient.exe
|
||||
SERVER_BIN := $(GAME_NAME)_server.exe
|
||||
MKDIR = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||
RMDIR = if exist $(subst /,\,$(1)) rd /s /q $(subst /,\,$(1))
|
||||
else ifeq ($(shell uname),FreeBSD)
|
||||
GL_LIB := -lGL
|
||||
LDFLAGS_PLAT := -L/usr/local/lib
|
||||
@@ -27,8 +38,6 @@ else ifeq ($(shell uname),FreeBSD)
|
||||
CLIENT_BIN := $(GAME_NAME)_client
|
||||
GLCLIENT_BIN := $(GAME_NAME)_glclient
|
||||
SERVER_BIN := $(GAME_NAME)_server
|
||||
MKDIR = mkdir -p $(1)
|
||||
RMDIR = rm -rf $(1)
|
||||
else
|
||||
GL_LIB := -lGL
|
||||
LDFLAGS_PLAT :=
|
||||
@@ -38,8 +47,15 @@ else
|
||||
CLIENT_BIN := $(GAME_NAME)_client
|
||||
GLCLIENT_BIN := $(GAME_NAME)_glclient
|
||||
SERVER_BIN := $(GAME_NAME)_server
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
# linking
|
||||
|
||||
Reference in new issue
Block a user