Skip to content

Commit

Permalink
Contribs: android, simplify the code, let the users supply the flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkempf committed Jun 22, 2012
1 parent bbb30ce commit 3e140bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
3 changes: 2 additions & 1 deletion contrib/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ check_android_sdk()
{
[ -z "${ANDROID_NDK}" ] && echo "You must set ANDROID_NDK environment variable" && exit 1
add_make "ANDROID_NDK := ${ANDROID_NDK}"
[ -z "${ANDROID_ABI}" ] && echo "You must set ANDROID_ABI environment variable" && exit 1
add_make "ANDROID_ABI := ${ANDROID_ABI}"
test -z "${NO_NEON}" && add_make_enabled "HAVE_NEON"
test -n "${TEGRA2}" && add_make_enabled "HAVE_TEGRA2"
}

test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
Expand Down
13 changes: 0 additions & 13 deletions contrib/src/main.mak
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,8 @@ endif
ifdef HAVE_ANDROID
CC := $(HOST)-gcc --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm
CXX := $(HOST)-g++ --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm
ifdef HAVE_NEON
ANDROID_ABI = armeabi-v7a
ANDROID_CPU_FLAGS = -mfpu=neon -mcpu=cortex-a8
else
ifdef HAVE_TEGRA2
ANDROID_ABI = armeabi-v7a
ANDROID_CPU_FLAGS = -mfpu=vfpv3-d16 -mcpu=cortex-a9
else
ANDROID_ABI = armeabi
ANDROID_CPU_FLAGS = -mcpu=arm1136jf-s -mfpu=vfp
endif
endif
EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/include
EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ANDROID_ABI)/include
EXTRA_CFLAGS += -mfloat-abi=softfp $(ANDROID_CPU_FLAGS)
endif

ifdef HAVE_MACOSX
Expand Down

0 comments on commit 3e140bd

Please sign in to comment.