Chinaunix首页 | 论坛 | 博客
  • 博客访问: 565752
  • 博文数量: 94
  • 博客积分: 1631
  • 博客等级: 上尉
  • 技术积分: 586
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-28 12:16
文章分类

全部博文(94)

文章存档

2014年(1)

2013年(11)

2012年(69)

2011年(7)

2010年(6)

我的朋友

分类: C/C++

2013-11-25 12:02:23

怎么改变在Makefile中的install -s,默认调用的strip为调用交叉编译的arm-linux-strip?

Makefile中:
install: chat
mkdir -p $(BINDIR) $(MANDIR)
$(INSTALL) -s -c chat $(BINDIR)
$(INSTALL) -c -m 644 chat.8 $(MANDIR)

运行结果:
cd chat; make  install
make[1]: Entering directory `/home/pwb/workdir/pppoe/ppp-2.4.4/chat'
mkdir -p /home/pwb/workdir/genimages-v1.0.3/mainfs/mnt/syslib/usr/sbin /home/pwb/workdir/genimages-v1.0.3/mainfs/mnt/syslib/usr/share/man/man8
install -s -c chat /home/pwb/workdir/genimages-v1.0.3/mainfs/mnt/syslib/usr/sbin
strip: Unable to recognise the format of the input file `/home/pwb/workdir/genimages-v1.0.3/mainfs/mnt/syslib/usr/sbin/chat'
install: strip failed
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/pwb/workdir/pppoe/ppp-2.4.4/chat'
make: *** [install-progs] Error 2

PS:当然可以直接把Makefile中的$(INSTALL) -s -c chat $(BINDIR)语句中的-s去掉 那样是可以的
我用的是开源的代码,每次用./configure时,各个目录中的Makefile又会重新生成,所以我每次有得改,觉得很麻烦;有什么办法使install -s不是调用默认的strip 而是调用交叉编译的strip?改configure文件?
阅读(10652) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~