mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-16 08:18:14 +00:00
Review build system for Android and RPI
This commit is contained in:
@@ -32,7 +32,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
SUBPLATFORM=WINDOWS
|
SUBPLATFORM=WINDOWS
|
||||||
else
|
else
|
||||||
UNAMEOS = $(shell uname -s)
|
UNAMEOS:=$(shell uname)
|
||||||
ifeq ($(UNAMEOS),Linux)
|
ifeq ($(UNAMEOS),Linux)
|
||||||
SUBPLATFORM=LINUX
|
SUBPLATFORM=LINUX
|
||||||
else
|
else
|
||||||
@@ -290,17 +290,19 @@ audio_music_stream: audio_music_stream.c
|
|||||||
# clean everything
|
# clean everything
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(SUBPLATFORM),OSX)
|
||||||
|
rm -f *.o
|
||||||
|
else
|
||||||
ifeq ($(SUBPLATFORM),LINUX)
|
ifeq ($(SUBPLATFORM),LINUX)
|
||||||
find . -type f -executable -delete
|
find . -type f -executable -delete
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
endif
|
|
||||||
ifeq ($(SUBPLATFORM),OSX)
|
|
||||||
rm -f *.o
|
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del *.o *.exe
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
|
find . -type f -executable -delete
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
|
14
src/core.c
14
src/core.c
@@ -170,7 +170,6 @@ static Matrix downscaleView; // Matrix to downscale view (in case
|
|||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
|
||||||
static const char *windowTitle; // Window text title...
|
static const char *windowTitle; // Window text title...
|
||||||
static char configFlags = 0;
|
|
||||||
|
|
||||||
static bool customCursor = false; // Tracks if custom cursor has been set
|
static bool customCursor = false; // Tracks if custom cursor has been set
|
||||||
static bool cursorOnScreen = false; // Tracks if cursor is inside client area
|
static bool cursorOnScreen = false; // Tracks if cursor is inside client area
|
||||||
@@ -204,6 +203,7 @@ static double updateTime, drawTime; // Time measures for update and draw
|
|||||||
static double frameTime; // Time measure for one frame
|
static double frameTime; // Time measure for one frame
|
||||||
static double targetTime = 0.0; // Desired time for one frame, if 0 not applied
|
static double targetTime = 0.0; // Desired time for one frame, if 0 not applied
|
||||||
|
|
||||||
|
static char configFlags = 0;
|
||||||
static bool showLogo = false;
|
static bool showLogo = false;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
@@ -455,12 +455,6 @@ int GetScreenHeight(void)
|
|||||||
return screenHeight;
|
return screenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the last key pressed
|
|
||||||
int GetKeyPressed(void)
|
|
||||||
{
|
|
||||||
return lastKeyPressed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sets Background Color
|
// Sets Background Color
|
||||||
void ClearBackground(Color color)
|
void ClearBackground(Color color)
|
||||||
{
|
{
|
||||||
@@ -674,6 +668,12 @@ bool IsKeyUp(int key)
|
|||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the last key pressed
|
||||||
|
int GetKeyPressed(void)
|
||||||
|
{
|
||||||
|
return lastKeyPressed;
|
||||||
|
}
|
||||||
|
|
||||||
// Detect if a mouse button has been pressed once
|
// Detect if a mouse button has been pressed once
|
||||||
bool IsMouseButtonPressed(int button)
|
bool IsMouseButtonPressed(int button)
|
||||||
{
|
{
|
||||||
|
11
src/makefile
11
src/makefile
@@ -31,7 +31,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
SUBPLATFORM=WINDOWS
|
SUBPLATFORM=WINDOWS
|
||||||
else
|
else
|
||||||
UNAMEOS = $(shell uname -s)
|
UNAMEOS:=$(shell uname)
|
||||||
ifeq ($(UNAMEOS),Linux)
|
ifeq ($(UNAMEOS),Linux)
|
||||||
SUBPLATFORM=LINUX
|
SUBPLATFORM=LINUX
|
||||||
else
|
else
|
||||||
@@ -144,16 +144,17 @@ stb_vorbis.o: stb_vorbis.c
|
|||||||
# clean everything
|
# clean everything
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(SUBPLATFORM),LINUX)
|
|
||||||
find . -type f -executable -delete
|
|
||||||
rm -f *.o libraylib.a
|
|
||||||
endif
|
|
||||||
ifeq ($(SUBPLATFORM),OSX)
|
ifeq ($(SUBPLATFORM),OSX)
|
||||||
rm -f *.o libraylib.a
|
rm -f *.o libraylib.a
|
||||||
|
else
|
||||||
|
ifeq ($(SUBPLATFORM),LINUX)
|
||||||
|
find . -type f -executable -delete
|
||||||
|
rm -f *.o libraylib.a
|
||||||
else
|
else
|
||||||
del *.o libraylib.a
|
del *.o libraylib.a
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
rm -f *.o libraylib.a
|
rm -f *.o libraylib.a
|
||||||
endif
|
endif
|
||||||
|
@@ -40,7 +40,6 @@ LOCAL_SRC_FILES :=\
|
|||||||
../../src/core.c \
|
../../src/core.c \
|
||||||
../../src/rlgl.c \
|
../../src/rlgl.c \
|
||||||
../../src/raymath.c \
|
../../src/raymath.c \
|
||||||
../../src/stb_image.c \
|
|
||||||
../../src/textures.c \
|
../../src/textures.c \
|
||||||
../../src/text.c \
|
../../src/text.c \
|
||||||
../../src/shapes.c \
|
../../src/shapes.c \
|
||||||
|
Reference in New Issue
Block a user