diff --git a/src/Makefile b/src/Makefile index 94346ca..d4db1e6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -64,9 +64,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(OS),Windows_NT) PLATFORM_OS = WINDOWS export PATH := $(COMPILER_PATH):$(PATH) - ifndef PLATFORM_SHELL - PLATFORM_SHELL = cmd - endif else UNAMEOS = $(shell uname) ifeq ($(UNAMEOS),Linux) @@ -87,9 +84,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(UNAMEOS),Darwin) PLATFORM_OS = OSX endif - ifndef PLATFORM_SHELL - PLATFORM_SHELL = sh - endif endif endif ifeq ($(PLATFORM),PLATFORM_DRM) @@ -97,28 +91,6 @@ ifeq ($(PLATFORM),PLATFORM_DRM) ifeq ($(UNAMEOS),Linux) PLATFORM_OS = LINUX endif - ifndef PLATFORM_SHELL - PLATFORM_SHELL = sh - endif -endif -ifeq ($(PLATFORM),PLATFORM_WEB) - ifeq ($(OS),Windows_NT) - PLATFORM_OS = WINDOWS - ifndef PLATFORM_SHELL - PLATFORM_SHELL = cmd - endif - else - UNAMEOS = $(shell uname) - ifeq ($(UNAMEOS),Linux) - PLATFORM_OS = LINUX - endif - ifeq ($(UNAMEOS),Darwin) - PLATFORM_OS = OSX - endif - ifndef PLATFORM_SHELL - PLATFORM_SHELL = sh - endif - endif endif ifeq ($(PLATFORM_OS),WINDOWS) @@ -367,40 +339,26 @@ $(PROJECT_NAME): $(OBJS) %.o: %.c $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -.PHONY: clean_shell_cmd clean_shell_sh - # Clean everything -clean: clean_shell_$(PLATFORM_SHELL) - @echo Cleaning done - -clean_shell_sh: +clean: ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + del *.o *.exe /s + endif ifeq ($(PLATFORM_OS),LINUX) find . -type f -executable -delete rm -fv *.o endif ifeq ($(PLATFORM_OS),OSX) - find . -type f -perm +ugo+x -delete - rm -f *.o + rm -f *.o external/*.o $(PROJECT_NAME) endif endif -ifeq ($(PLATFORM),PLATFORM_RPI) - find . -type f -executable -delete - rm -fv *.o -endif ifeq ($(PLATFORM),PLATFORM_DRM) find . -type f -executable -delete rm -fv *.o endif ifeq ($(PLATFORM),PLATFORM_WEB) - ifeq ($(PLATFORM_OS),LINUX) - rm -fv *.o $(PROJECT_NAME).data $(PROJECT_NAME).html $(PROJECT_NAME).js $(PROJECT_NAME).wasm - endif - ifeq ($(PLATFORM_OS),OSX) - rm -f *.o $(PROJECT_NAME).data $(PROJECT_NAME).html $(PROJECT_NAME).js $(PROJECT_NAME).wasm - endif + del *.o *.html *.js endif + @echo Cleaning done -clean_shell_cmd: SHELL=cmd -clean_shell_cmd: - del *.o *.exe $(PROJECT_NAME).data $(PROJECT_NAME).html $(PROJECT_NAME).js $(PROJECT_NAME).wasm /s