"크로스컴파일"의 두 판 사이의 차이
(→빌드순서) |
(→빌드순서) |
||
23번째 줄: | 23번째 줄: | ||
$ autoconf | $ autoconf | ||
$ automake --add-missing -copy | $ automake --add-missing -copy | ||
− | $ ./configure | + | $ ./[[configure]] |
$ make | $ make | ||
$ make check | $ make check |
2019년 5월 26일 (일) 06:41 판
타겟: arm
크로스 컴파일러 설치
$ sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
pkg-config스크립트
#!/bin/sh
if [ "$CROSS_COMPILING" = TRUE ]; then
SYSROOT=[타켓루트경로]
export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${SYSROOT}/usr/share/pkgconfig
export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
fi
exec pkg-config "$@"
빌드순서
$ aclocal $ autoheader $ autoconf $ automake --add-missing -copy $ ./configure $ make $ make check $ make install
흔히 configure 전까지의 과정을 묶어서 bootstrap 또는 autogen.sh 라는 script 로 만들어서 한꺼번에 실행시킨다.