commit
1a2a44200a
26
src/Makefile
26
src/Makefile
@ -21,6 +21,8 @@
|
|||||||
#
|
#
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
# define raylib platform to compile for
|
# define raylib platform to compile for
|
||||||
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
||||||
PLATFORM ?= PLATFORM_DESKTOP
|
PLATFORM ?= PLATFORM_DESKTOP
|
||||||
@ -97,9 +99,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# typing 'make' will invoke the first target entry in the file,
|
# typing 'make' will invoke the default target entry called 'all',
|
||||||
# in this case, the 'default' target entry is raylib
|
# in this case, the 'default' target entry is basic_game
|
||||||
default: raylib
|
all: raylib
|
||||||
|
|
||||||
# compile raylib library
|
# compile raylib library
|
||||||
raylib: $(OBJS)
|
raylib: $(OBJS)
|
||||||
@ -161,21 +163,21 @@ gestures.o: gestures.c
|
|||||||
# clean everything
|
# clean everything
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
rm -f *.o libraylib.a
|
|
||||||
else
|
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
|
||||||
rm -f *.o libraylib.a
|
|
||||||
else
|
|
||||||
del *.o libraylib.a
|
del *.o libraylib.a
|
||||||
|
else
|
||||||
|
rm -f *.o libraylib.a
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
del *.o libraylib.bc
|
||||||
|
else
|
||||||
|
rm -f *.o libraylib.bc
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
rm -f *.o libraylib.a
|
rm -f *.o libraylib.a
|
||||||
endif
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
|
||||||
del *.o libraylib.bc
|
|
||||||
endif
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#
|
#
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
# define raylib platform to compile for
|
# define raylib platform to compile for
|
||||||
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
||||||
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
||||||
@ -202,21 +204,22 @@ clean:
|
|||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
find . -type f -perm +ugo+x -delete
|
find . -type f -perm +ugo+x -delete
|
||||||
rm -f *.o
|
rm -f screens/*.o
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
|
find . -type f -executable -delete
|
||||||
|
rm -f screens/*.o
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del screens\*.o *.exe
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
find . -type f -executable -delete
|
find . -type f -executable -delete
|
||||||
rm -f *.o
|
rm -f screens/*.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
del *.o *.html *.js
|
del screens/*.o *.html *.js
|
||||||
endif
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#
|
#
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
# define raylib platform to compile for
|
# define raylib platform to compile for
|
||||||
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
||||||
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
||||||
@ -177,7 +179,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
rm -f *.o
|
rm -f *.o
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
|
find . -type f -executable -delete
|
||||||
|
rm -f *.o
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del *.o *.exe
|
||||||
endif
|
endif
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#
|
#
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
# define raylib platform to compile for
|
# define raylib platform to compile for
|
||||||
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
||||||
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
||||||
@ -176,7 +178,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
rm -f *.o
|
rm -f *.o
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
|
find . -type f -executable -delete
|
||||||
|
rm -f *.o
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del *.o *.exe
|
||||||
endif
|
endif
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#
|
#
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
# define raylib platform to compile for
|
# define raylib platform to compile for
|
||||||
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
||||||
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
||||||
@ -181,7 +183,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
rm -f *.o
|
rm -f *.o
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
|
find . -type f -executable -delete
|
||||||
|
rm -f screens/*.o
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del *.o *.exe
|
||||||
endif
|
endif
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#
|
#
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
# define raylib platform to compile for
|
# define raylib platform to compile for
|
||||||
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
|
||||||
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
||||||
@ -202,21 +204,22 @@ clean:
|
|||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
find . -type f -perm +ugo+x -delete
|
find . -type f -perm +ugo+x -delete
|
||||||
rm -f *.o
|
rm -f screens/*.o
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
|
find . -type f -executable -delete
|
||||||
|
rm -f screens/*.o
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del screens\*.o *.exe
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
find . -type f -executable -delete
|
find . -type f -executable -delete
|
||||||
rm -f *.o
|
rm -f screens/*.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
del *.o *.html *.js
|
del screens/*.o *.html *.js
|
||||||
endif
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user