radare2/mk/android.mk
radare 9e08da0fa6
Improve build of libr.a and libr.dylib, fix and improve sys/ios-sdk.sh (#10046)
- Update spp and force hidden visibility
- Use R_API wisely
- RSys.prefix returns const things
- Use -install_name on Apple
- Fix merged lib visibility linking on Linux
- Use OSTYPE instead of BUILD_OS
- Honor crosscompiler-objcopy and support android like linux
- Add extra missing archives
- Fix for android
- Upgrade spp and sdb
- Skip libr. from symstall
- Add --enable-merged configure option
- Use --enable-merged on ios-sdk
- Upgrade sdb again for js0n
- Kill sys/ios-shell.sh
- Msvc dynamic build fix
2018-05-09 23:31:52 +02:00

62 lines
1.0 KiB
Makefile

# 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
CC=ndk-gcc -fPIC -fPIE
USERCC=ndk-gcc -fPIC -fPIE
endif
ARCH=arm
ifeq (${NDK_ARCH},x86)
# mips
ARCH2=i686
CROSS=${ARCH2}-linux-android-
endif
ifeq (${NDK_ARCH},mips)
# mips
ARCH2=mipsel
CROSS=${ARCH2}-linux-android-
endif
ifeq (${NDK_ARCH},mips64)
# mips
ARCH2=mips64el
CROSS=${ARCH2}-linux-android-
endif
ifeq (${NDK_ARCH},arm)
# arm32
ARCH=arm
CROSS=${ARCH}-linux-androideabi-
endif
ifeq (${NDK_ARCH},aarch64)
# aarch64
ARCH=aarch64
CROSS=${ARCH}-linux-android-
endif
RANLIB=${CROSS}ranlib
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=${CROSS}ld -r --whole-archive
ONELIB=0
OSTYPE=android
LINK=
#CC_AR=ndk-ar -r ${LIBAR}
PICFLAGS=-fPIC -fpic
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
OBJCOPY=${CROSS}objcopy