summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2022-02-12 17:37:12 +0100
committerraysan5 <[email protected]>2022-02-12 17:37:12 +0100
commitab47c6401e3a7da22a2e9e1f4a2a63144d51e13a (patch)
tree3b822ee1734d1106f3b1a3b403ef29b38dad7ab1 /src
parent81cced4d83a388c387695a8a5477ff35e613e527 (diff)
downloadraylib-ab47c6401e3a7da22a2e9e1f4a2a63144d51e13a.tar.gz
raylib-ab47c6401e3a7da22a2e9e1f4a2a63144d51e13a.zip
Reviewed Makefile clean target to use CMD shell on Windows
Tested on the following environments: - w64devkit.exe - Windows 10 cmd - Notepad++ NppExec console
Diffstat (limited to 'src')
-rw-r--r--src/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile
index 3048f98a..c63326e1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -36,7 +36,6 @@
# NOTE: Highly recommended to read the raylib Wiki to know how to compile raylib for different platforms
# https://github.com/raysan5/raylib/wiki
-
.PHONY: all clean install uninstall
# Define required environment variables
@@ -106,6 +105,7 @@ ROOT = $(shell whoami)
# By default we suppose we are working on Windows
HOST_PLATFORM_OS ?= WINDOWS
+PLATFORM_OS ?= WINDOWS
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@@ -148,6 +148,12 @@ ifeq ($(PLATFORM),PLATFORM_DRM)
endif
endif
+ifeq ($(PLATFORM_OS),WINDOWS)
+ # Make uses by default Sh shell, if a different shell is required, it must be specified
+ # On Windows we set CMD as default shell to allow calling del command on clean target
+ SHELL := cmd
+endif
+
ifeq ($(PLATFORM),PLATFORM_WEB)
# Emscripten required variables
EMSDK_PATH ?= C:/emsdk
@@ -731,12 +737,6 @@ endif
# Clean everything
clean:
ifeq ($(PLATFORM_OS),WINDOWS)
- # Make always tries to run build rules under sh.exe by default
- # So if sh.exe is present in the PATH on windows, the del commands will fail
- # see README.W32 of GNU Make for more details
- # It is not specified earlier in the Makefile, because then cross-compilation
- # will also fail.
- SHELL = cmd
del *.o /s
cd $(RAYLIB_RELEASE_PATH)
del lib$(RAYLIB_LIB_NAME).a /s