Added full support for HTML5 (emscripten)

Corrected some bugs on the way...
Automatically convert textures to POT on RPI and WEB
This commit is contained in:
raysan5
2014-12-31 18:03:32 +01:00
parent 08a4ee34eb
commit 905b6ec53d
14 changed files with 527 additions and 234 deletions

View File

@ -1,8 +1,6 @@
#**************************************************************************************************
#
# raylib for Raspberry Pi and Windows desktop
#
# makefile for library compilation (raylib.a)
# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten)
#
# Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
#
@ -23,8 +21,8 @@
#
#**************************************************************************************************
# define raylib platform (by default, compile for RPI)
# Other possible platforms: PLATFORM_DESKTOP_WIN PLATFORM_DESKTOP_LINUX PLATFORM_WEB
# define raylib platform to compile for
# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB
PLATFORM ?= PLATFORM_DESKTOP
# define raylib graphics api depending on selected platform
@ -81,7 +79,7 @@ default: raylib
# compile raylib library
raylib: $(OBJS)
ifeq ($(PLATFORM),PLATFORM_WEB)
emcc -O1 $(OBJS) -o raylib.bc
emcc -O1 $(OBJS) -o libraylib.bc
else
ar rcs libraylib.a $(OBJS)
endif
@ -135,9 +133,13 @@ else
ifeq ($(PLATFORM),PLATFORM_DESKTOP_LINUX)
find . -type f -executable -delete
rm -f *.o libraylib.a
else
ifeq ($(PLATFORM),PLATFORM_WEB)
del *.o libraylib.bc
else
del *.o libraylib.a
endif
endif
endif
@echo Cleaning done