2017-03-09 11:09:26 +00:00
|
|
|
# Ugly yet that's the path inside dockcross
|
|
|
|
ifeq (${PATH},"/usr/arm-linux-androideabi/bin/${ARCH}-linux-androideabi-gcc")
|
|
|
|
CC=${ARCH}-linux-androideabi-gcc
|
|
|
|
USERCC=${ARCH}-linux-androideabi-gcc -fPIC -fPIE
|
|
|
|
else
|
2015-09-14 17:21:57 +00:00
|
|
|
CC=ndk-gcc -fPIC -fPIE
|
|
|
|
USERCC=ndk-gcc -fPIC -fPIE
|
2017-03-09 11:09:26 +00:00
|
|
|
endif
|
|
|
|
|
2014-11-10 01:26:03 +00:00
|
|
|
ARCH=arm
|
2014-11-10 18:46:19 +00:00
|
|
|
|
|
|
|
ifeq (${NDK_ARCH},x86)
|
|
|
|
# mips
|
|
|
|
ARCH2=i686
|
2018-01-09 23:59:38 +00:00
|
|
|
CROSS=${ARCH2}-linux-android-
|
2014-11-10 18:46:19 +00:00
|
|
|
endif
|
2014-11-11 01:14:19 +00:00
|
|
|
|
2014-11-10 18:46:19 +00:00
|
|
|
ifeq (${NDK_ARCH},mips)
|
|
|
|
# mips
|
2014-11-11 00:12:38 +00:00
|
|
|
ARCH2=mipsel
|
2018-01-09 23:59:38 +00:00
|
|
|
CROSS=${ARCH2}-linux-android-
|
2014-11-10 18:46:19 +00:00
|
|
|
endif
|
|
|
|
|
2014-11-11 00:30:54 +00:00
|
|
|
ifeq (${NDK_ARCH},mips64)
|
|
|
|
# mips
|
|
|
|
ARCH2=mips64el
|
2018-01-09 23:59:38 +00:00
|
|
|
CROSS=${ARCH2}-linux-android-
|
2014-11-11 00:30:54 +00:00
|
|
|
endif
|
|
|
|
|
2014-11-10 01:26:03 +00:00
|
|
|
ifeq (${NDK_ARCH},arm)
|
2014-11-10 00:09:38 +00:00
|
|
|
# arm32
|
|
|
|
ARCH=arm
|
2018-01-09 23:59:38 +00:00
|
|
|
CROSS=${ARCH}-linux-androideabi-
|
2014-11-10 01:26:03 +00:00
|
|
|
endif
|
2014-11-10 00:09:38 +00:00
|
|
|
|
2014-11-10 01:26:03 +00:00
|
|
|
ifeq (${NDK_ARCH},aarch64)
|
2014-11-10 00:09:38 +00:00
|
|
|
# aarch64
|
|
|
|
ARCH=aarch64
|
2018-01-09 23:59:38 +00:00
|
|
|
CROSS=${ARCH}-linux-android-
|
2014-11-10 00:09:38 +00:00
|
|
|
endif
|
2018-01-09 23:59:38 +00:00
|
|
|
|
2019-08-01 02:39:40 +00:00
|
|
|
ifeq (${NDK_ARCH},)
|
|
|
|
all::
|
|
|
|
echo "Undefined NDK_ARCH"
|
|
|
|
exit 1
|
|
|
|
endif
|
|
|
|
|
2018-01-09 23:59:38 +00:00
|
|
|
RANLIB=${CROSS}ranlib
|
|
|
|
AR=${CROSS}ar
|
2019-07-18 09:44:15 +00:00
|
|
|
CC_AR=${CROSS}ar -r ${LIBAR}
|
2019-08-01 02:39:40 +00:00
|
|
|
PARTIALLD=${CROSS}ld -r
|
|
|
|
# -all_load
|
2011-09-25 04:57:13 +00:00
|
|
|
ONELIB=0
|
|
|
|
OSTYPE=android
|
2019-08-01 02:39:40 +00:00
|
|
|
#LINK=
|
2011-09-25 19:07:34 +00:00
|
|
|
#CC_AR=ndk-ar -r ${LIBAR}
|
2015-09-14 17:21:57 +00:00
|
|
|
PICFLAGS=-fPIC -fpic
|
2019-07-18 09:44:15 +00:00
|
|
|
LDFLAGS_LIB=-shared
|
2011-09-25 04:57:13 +00:00
|
|
|
CFLAGS+=${PICFLAGS}
|
|
|
|
CC_LIB=${CC} -shared -o
|
|
|
|
CFLAGS_INCLUDE=-I
|
|
|
|
LDFLAGS_LINK=-l
|
|
|
|
LDFLAGS_LINKPATH=-L
|
|
|
|
CFLAGS_OPT0=-O0
|
|
|
|
CFLAGS_OPT1=-O1
|
|
|
|
CFLAGS_OPT2=-O2
|
|
|
|
CFLAGS_OPT3=-O3
|
|
|
|
CFLAGS_DEBUG=-g
|
2018-05-09 21:31:52 +00:00
|
|
|
OBJCOPY=${CROSS}objcopy
|