'automake'에 해당되는 글 2건

  1. 2010.05.18 cross compile 초기화 하기
  2. 2010.03.02 개발환경 자동화 - autoconf, automake, libtool
드물게(?) 크로스컴파일을 시도하려다 다시 지우고 컴파일을 하려고 하면 안되는 경우가 있다.
아래는 gdb/insight의 경우인데, 특이하게도 하라는대로 해도 안된다. ㄱ-

configure: loading cache ./config.cache
configure: error: `target_alias' has changed since the previous run:
configure:   former value:  sh4-linux
configure:   current value: i686-pc-linux-gnu
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over

이녀석은 make distclean 해도 하위 디렉토리의 config.cache를 개별로 지우지 않기 때문이다.
(음... 알려줘서 원 소스에 넣도록 해야하나?)

미봉책으로는
# make distclean
# find ./ -name config.cache -exec {} \;
를 하면 하위 디렉토리에서 config.cache를 찾아 지우므로 해결된다.

'프로그램 사용 > make, configure' 카테고리의 다른 글

make를 조용하게  (0) 2014.09.12
cmake 사용  (0) 2011.10.07
cmake - cross make  (0) 2010.04.06
makefile 에서 컴파일할 목록 생성하기  (0) 2010.04.03
makefile 정렬하기  (2) 2010.03.31
Posted by 구차니
컴파일 환경 자동화툴인
autoconf, automake, libtool을 설명한다.

컴파일시 각종 헤더들의 위치, 라이브러리들의위치
그리고 설치할 위치들을 설정하고,
컴파일할 프로그램의 세부 패키지를 설정한다.

아래는 ffmpeg의 configure --help 내용중 일부이다.
Standard options:
  --prefix=PREFIX         install in PREFIX          []

  --bindir=DIR            install binaries in DIR    [PREFIX/bin]
  --datadir=DIR           install data files in DIR  [PREFIX/share/ffmpeg]
  --libdir=DIR            install libs in DIR        [PREFIX/lib]
  --shlibdir=DIR          install shared libs in DIR [PREFIX/lib]
  --incdir=DIR            install includes in DIR    [PREFIX/include]
  --mandir=DIR            install man page in DIR    [PREFIX/share/man]

Advanced options (experts only):
  --enable-cross-compile   assume a cross-compiler is used
  --arch=ARCH              select architecture []
  --target-os=OS           compiler targets OS []
  --cross-prefix=PREFIX    use PREFIX for compilation tools []
  --source-path=PATH       path to source code [/home/morpheuz/st7109/target_ori/root/ffmpeg]
  --sysroot=PATH           root of cross-build tree
  --sysinclude=PATH        location of cross-build system headers
  --target-exec=CMD        command to run executables on target
  --target-path=DIR        path to view of build directory on target
  --nm=NM                  use nm tool
  --as=AS                  use assembler AS []
  --cc=CC                  use C compiler CC [gcc]
  --ld=LD                  use linker LD
  --host-cc=HOSTCC         use host C compiler HOSTCC
  --host-cflags=HCFLAGS    use HCFLAGS when compiling for host
  --host-ldflags=HLDFLAGS  use HLDFLAGS when linking for host
  --host-libs=HLIBS        use libs HLIBS when linking for host
  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS []
  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
  --extra-libs=ELIBS       add ELIBS []
  --extra-version=STRING   version string suffix []
  --build-suffix=SUFFIX    library name suffix []
  --cpu=CPU                select the minimum required CPU (affects
                           instruction selection, may crash on older CPUs)
  --disable-yasm           disable use of yasm assembler
  --enable-pic             build position-independent code

이녀석의 경우 arch 와 target-os를 조합해서 cross compiler prefix를 만들어 낸다.
예를들어 sh4-linux의 경우
--enable-cross-compile --arch=sh4 --target-os=linux 라고 하면
자동으로 sh4-linux- 접두를 붙이게 된다.

하지만, target 에만 존재하는 library를 끌어 오려면 어떤 옵션을 써야 하나.. 후우..

[링크 : http://wariua.springnote.com/pages/1041972] << 한글 번역
[링크 : http://sources.redhat.com/autobook/]
Posted by 구차니