diff options
| author | raysan5 <raysan5@gmail.com> | 2014-12-15 01:08:30 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2014-12-15 01:08:30 +0100 |
| commit | cfa60ab7e6313f85594f63d2830fdc2ce19e180e (patch) | |
| tree | 2d962e95278204622a4b259ea95c9adf41857156 /src/makefile | |
| parent | d3cf316e40b531542b6f55b965f3369d4aca28d6 (diff) | |
| download | raylib-cfa60ab7e6313f85594f63d2830fdc2ce19e180e.tar.gz raylib-cfa60ab7e6313f85594f63d2830fdc2ce19e180e.zip | |
Added support for emscripten and more
Added PLATFORM_WEB support (emscripten-webgl)
[audio] Added LoadSoundFromWave()
[textures] Added LoadTextureFromImage() to replace CreateTexture()
Some TraceLogs edited...
Diffstat (limited to 'src/makefile')
| -rw-r--r-- | src/makefile | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/makefile b/src/makefile index 2a905052..88d2258c 100644 --- a/src/makefile +++ b/src/makefile @@ -25,7 +25,7 @@ # define raylib platform (by default, compile for RPI) # Other possible platforms: PLATFORM_DESKTOP_WIN PLATFORM_DESKTOP_LINUX PLATFORM_WEB -PLATFORM ?= PLATFORM_RPI +PLATFORM ?= PLATFORM_DESKTOP # define raylib graphics api depending on selected platform ifeq ($(PLATFORM),PLATFORM_RPI) @@ -37,6 +37,10 @@ else #GRAPHICS = GRAPHICS_API_OPENGL_33 # Uncomment to use OpenGL 3.3 endif +ifeq ($(PLATFORM),PLATFORM_WEB) + GRAPHICS = GRAPHICS_API_OPENGL_ES2 +endif + # NOTE: makefiles targets require tab indentation # define compiler: gcc for C program, define as g++ for C++ @@ -52,15 +56,12 @@ endif # -O2 defines optimization level # -Wall turns on most, but not all, compiler warnings # -std=c99 use standard C from 1999 revision -ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O3 -s USE_GLFW=3 -s LEGACY_GL_EMULATION=1 -else ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline + CFLAGS = -O1 -Wall -std=gnu99 -fgnu89-inline else - CFLAGS = -O2 -Wall -std=c99 -endif + CFLAGS = -O1 -Wall -std=c99 endif + #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes # define any directories containing required header files @@ -80,7 +81,7 @@ default: raylib # compile raylib library raylib: $(OBJS) ifeq ($(PLATFORM),PLATFORM_WEB) - emcc $(OBJS) -o raylib.bc + emcc -O1 $(OBJS) -o raylib.bc else ar rcs libraylib.a $(OBJS) endif @@ -92,7 +93,7 @@ core.o: core.c # compile rlgl module rlgl.o: rlgl.c - $(CC) -c rlgl.c $(CFLAGS) $(INCLUDES) -D$(GRAPHICS) + $(CC) -c rlgl.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) # compile raymath module raymath.o: raymath.c |
