Skip to content

Commit

Permalink
Review build system for Android and RPI
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jan 4, 2015
1 parent b2a5390 commit 4a7e522
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
10 changes: 6 additions & 4 deletions examples/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(OS),Windows_NT)
SUBPLATFORM=WINDOWS
else
UNAMEOS = $(shell uname -s)
UNAMEOS:=$(shell uname)
ifeq ($(UNAMEOS),Linux)
SUBPLATFORM=LINUX
else
Expand Down Expand Up @@ -290,17 +290,19 @@ audio_music_stream: audio_music_stream.c
# clean everything
clean:
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(SUBPLATFORM),OSX)
rm -f *.o
else
ifeq ($(SUBPLATFORM),LINUX)
find . -type f -executable -delete
rm -f *.o
endif
ifeq ($(SUBPLATFORM),OSX)
rm -f *.o
else
del *.o *.exe
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
find . -type f -executable -delete
rm -f *.o
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
Expand Down
14 changes: 7 additions & 7 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ static Matrix downscaleView; // Matrix to downscale view (in case

#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
static const char *windowTitle; // Window text title...
static char configFlags = 0;

static bool customCursor = false; // Tracks if custom cursor has been set
static bool cursorOnScreen = false; // Tracks if cursor is inside client area
Expand Down Expand Up @@ -204,6 +203,7 @@ static double updateTime, drawTime; // Time measures for update and draw
static double frameTime; // Time measure for one frame
static double targetTime = 0.0; // Desired time for one frame, if 0 not applied

static char configFlags = 0;
static bool showLogo = false;

//----------------------------------------------------------------------------------
Expand Down Expand Up @@ -455,12 +455,6 @@ int GetScreenHeight(void)
return screenHeight;
}

// Get the last key pressed
int GetKeyPressed(void)
{
return lastKeyPressed;
}

// Sets Background Color
void ClearBackground(Color color)
{
Expand Down Expand Up @@ -674,6 +668,12 @@ bool IsKeyUp(int key)
else return false;
}

// Get the last key pressed
int GetKeyPressed(void)
{
return lastKeyPressed;
}

// Detect if a mouse button has been pressed once
bool IsMouseButtonPressed(int button)
{
Expand Down
9 changes: 5 additions & 4 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(OS),Windows_NT)
SUBPLATFORM=WINDOWS
else
UNAMEOS = $(shell uname -s)
UNAMEOS:=$(shell uname)
ifeq ($(UNAMEOS),Linux)
SUBPLATFORM=LINUX
else
Expand Down Expand Up @@ -144,15 +144,16 @@ stb_vorbis.o: stb_vorbis.c
# clean everything
clean:
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(SUBPLATFORM),OSX)
rm -f *.o libraylib.a
else
ifeq ($(SUBPLATFORM),LINUX)
find . -type f -executable -delete
rm -f *.o libraylib.a
endif
ifeq ($(SUBPLATFORM),OSX)
rm -f *.o libraylib.a
else
del *.o libraylib.a
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
rm -f *.o libraylib.a
Expand Down
1 change: 0 additions & 1 deletion src_android/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ LOCAL_SRC_FILES :=\
../../src/core.c \
../../src/rlgl.c \
../../src/raymath.c \
../../src/stb_image.c \
../../src/textures.c \
../../src/text.c \
../../src/shapes.c \
Expand Down

0 comments on commit 4a7e522

Please sign in to comment.