+ -
当前位置:首页 → 问答吧 → [求助]TCPDUMP移植的问题

[求助]TCPDUMP移植的问题

时间:2006-05-19

来源:互联网

想把TCPDUMP移植到开发板上
查了半天资料
从网上下到了两个代码包
libpcap-0.9.4.tar.gz和tcpdump-3.9.4.tar.gz

得知编译之前要先确定库文件libpcap已经安装完毕,这个库文件是tcpdump软件所需的库文件于是就先打开libpcap-0.9.4.tar.gz
解压后看到Makefile.in文件
打开后看到

# Top level hierarchy
prefix = @prefix@
exec_prefix = @exec_prefix@
# Pathname of directory to install the include files
includedir = @includedir@
# Pathname of directory to install the library
libdir = @libdir@
# Pathname of directory to install the man page
mandir = @mandir@

# VPATH
srcdir = @srcdir@
VPATH = @srcdir@

#
# You shouldn't need to edit anything below.
#

CC = @CC@
CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
DEFS = @DEFS@ @V_DEFS@
LIBS = @V_LIBS@
DYEXT = @DYEXT@

# Standard CFLAGS
CFLAGS = $(CCOPT) $(INCLS) $(DEFS)

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@

想问@在这里是表示什么啊?
要交叉编译的话应该把@CC@改成什么?
默认prefix = @prefix@会安装到什么地方???
呵呵      

作者: hoohow   发布时间: 2006-05-19

不用改Makefile.in,
   (1)进入libpcap目录,打开configure。将下面两部分代码注释掉
       #if test -z "$with_pcap" && test "$cross_compiling" = yes; then
     # { { echo "$as_me:$LINENO: error: pcap type not determined when cross-compiling; use --with-pcap=..." >&5
     #echo "$as_me: error: pcap type not determined when cross-compiling; use --with-pcap=..." >&2;}
     #   { (exit 1); exit 1; }; }
     #fi
   .......
     #   if test $ac_cv_linux_vers = unknown ; then
     #   { { echo "$as_me:$LINENO: error: cannot determine linux version when cross-compiling" >&5
     #echo "$as_me: error: cannot determine linux version when cross-compiling" >&2;}
     #   { (exit 1); exit 1; }; }
     #   fi
执行./configure --host=arm-uclibc-linux,会生成Makefile。打开Makefile发现CC=mipsel-linux-gcc,说明交叉编译配置成功。

作者: radardsp   发布时间: 2010-05-26

热门下载

更多