summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2017-05-11 16:45:49 +0200
committerRay <[email protected]>2017-05-11 16:45:49 +0200
commit518bdfc134bfa00426f22abd574831f7ec51924a (patch)
tree7a08f817e87bdbe4ff0a52a81542b3d7206ebdd5
parent35fe34ba0f4a8de97e0854a64c52eca88bab98cf (diff)
downloadraylib-518bdfc134bfa00426f22abd574831f7ec51924a.tar.gz
raylib-518bdfc134bfa00426f22abd574831f7ec51924a.zip
Some work on Android build
-rw-r--r--examples/Makefile5
-rw-r--r--src/Makefile10
2 files changed, 12 insertions, 3 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 18a5d1f4..c3728b3b 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -541,6 +541,11 @@ physac/physics_restitution: physac/physics_restitution.c
# compile [physac] example - physics shatter
physac/physics_shatter: physac/physics_shatter.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS)
+
+ifeq ($(PLATFORM),PLATFORM_ANDROID)
+external/native_app_glue.o : native_app_glue.c native_app_glue.h
+ $(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(SHAREDFLAG)
+endif
# fix dylib install path name for each executable (MAC)
fix_dylib:
diff --git a/src/Makefile b/src/Makefile
index bf19018b..e9de5623 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -101,7 +101,7 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
# Android standalone toolchain path
# NOTE: This path is also used if toolchain generation
#ANDROID_TOOLCHAIN = $(CURDIR)/toolchain
- ANDROID_TOOLCHAIN = C:/raylib/android-standalone-toolchain
+ ANDROID_TOOLCHAIN = C:/raylib/android-toolchain
# Android architecture: ARM or ARM64
ANDROID_ARCH ?= ARM
@@ -230,8 +230,13 @@ endif
# external required libraries (stb and others)
INCLUDES = -I. -Iexternal
+
# OpenAL Soft library
-INCLUDES += -Iexternal/openal_soft/include
+ifeq ($(PLATFORM),PLATFORM_ANDROID)
+ INCLUDES += -Iandroid/jni/include/AL
+else
+ INCLUDES += -Iexternal/openal_soft/include
+endif
# define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@@ -377,7 +382,6 @@ external/stb_vorbis.o: external/stb_vorbis.c external/stb_vorbis.h
utils.o : utils.c utils.h
$(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(SHAREDFLAG)
-
# It installs generated and needed files to compile projects using raylib.
# The installation works manually.
# TODO: add other platforms.