Android NDK로 OpenSSL 크로스 컴파일 하기
(예전 자료라 지금도 되는지는...)
1. 참고
a. https://wiki.openssl.org/index.php/Android
2. NDK 다운로드
3. Android 환경 설정 shell 파일 다운로드
a. https://wiki.openssl.org/images/7/70/Setenv-android.sh
4. Shell 파일 수정
a. _ANDROID_NDK
i. NDK 버전(ex. Android-ndk-r9d)
b. _ANDROID_ARCH
i. arch_arm
c. _ANDROID_EABI
i. arm-linux-androideabi-4.6
d. _ANDROID_API
i. 안드로이드 API 레벨(ex. android-17)
e. _ANDROID_NDK_ROOT
i. 다운로드 받은 NDK 디렉토리
ii. Ex. "/opt/Android/android-ndk-r9d"
5. 환경변수 읽기
a. $. ./setenv-android.sh
b. 에러 무시
i. "Error: FIPS_SIG does not specify incore module, please edit this script
6. Makefile 수정
a. $ perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
7. Config
a. $ ./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine --openssldir=#인스톨DIR
8. Make
a. $ make depend
b. $ make all
c. 빌드 된 라이브러리의 아키텍쳐 확인
i. $ readelf -h ./libcrypto.a | grep -i 'class\|machine' | head -2
9. Install
a. $ make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib
컴파일 시 the mangling of va_list 메세지 나올 때 (0) | 2021.07.15 |
---|---|
배경에 투명도 설정하기 (0) | 2015.04.13 |
이클립스에서 The project was not built since its build path is incomplete. 에러 발생?? (0) | 2014.11.25 |
dimens.xml 및 소스에 적용하기 (0) | 2014.08.18 |
substring, lastIndexOf 활용해 마지막 폴더(디렉토리)명만 가져오기 (0) | 2014.08.12 |