mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Corrected some bugs...
[core] Added SetMousePosition() [models] LoadHeightmap() - Corrected textures bug [raymath] Functions renaming [WEB] Prepare environment for emscripten!
This commit is contained in:
31
src/makefile
31
src/makefile
@ -24,7 +24,7 @@
|
||||
#**************************************************************************************************
|
||||
|
||||
# define raylib platform (by default, compile for RPI)
|
||||
# Other possible platforms: PLATFORM_DESKTOP PLATFORM_DESKTOP_LINUX
|
||||
# Other possible platforms: PLATFORM_DESKTOP_WIN PLATFORM_DESKTOP_LINUX PLATFORM_DESKTOP_MAC PLATFORM_WEB
|
||||
PLATFORM ?= PLATFORM_RPI
|
||||
|
||||
# define raylib graphics api depending on selected platform
|
||||
@ -40,16 +40,26 @@ endif
|
||||
# NOTE: makefiles targets require tab indentation
|
||||
|
||||
# define compiler: gcc for C program, define as g++ for C++
|
||||
CC = gcc
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# define emscripten compiler
|
||||
CC = emcc
|
||||
else
|
||||
# define default gcc compiler
|
||||
CC = gcc
|
||||
endif
|
||||
|
||||
# define compiler flags:
|
||||
# -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
|
||||
else
|
||||
CFLAGS = -O2 -Wall -std=c99 -fgnu89-inline
|
||||
CFLAGS = -O2 -Wall -std=c99
|
||||
endif
|
||||
endif
|
||||
#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
||||
|
||||
@ -69,11 +79,16 @@ default: raylib
|
||||
|
||||
# compile raylib library
|
||||
raylib: $(OBJS)
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
emcc $(OBJS) -o raylib.bc
|
||||
else
|
||||
ar rcs libraylib.a $(OBJS)
|
||||
endif
|
||||
|
||||
# compile core module
|
||||
# emcc core.c -o core.bc -DPLATFORM_DESKTOP
|
||||
core.o: core.c
|
||||
$(CC) -c core.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||
$(CC) -c core.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
|
||||
|
||||
# compile rlgl module
|
||||
rlgl.o: rlgl.c
|
||||
@ -85,19 +100,19 @@ raymath.o: raymath.c
|
||||
|
||||
# compile shapes module
|
||||
shapes.o: shapes.c
|
||||
$(CC) -c shapes.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||
$(CC) -c shapes.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
|
||||
|
||||
# compile textures module
|
||||
textures.o: textures.c
|
||||
$(CC) -c textures.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||
$(CC) -c textures.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
|
||||
|
||||
# compile text module
|
||||
text.o: text.c
|
||||
$(CC) -c text.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||
$(CC) -c text.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
|
||||
|
||||
# compile models module
|
||||
models.o: models.c
|
||||
$(CC) -c models.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||
$(CC) -c models.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
|
||||
|
||||
# compile audio module
|
||||
audio.o: audio.c
|
||||
|
||||
Reference in New Issue
Block a user