xvid 在MAC平台编译的问题

Compiling / building XviD with asm optimisations for Mac OS X Intel

Using Apple’s nasm one can compile a working XviD binary using the x86 asm that will run on Core Duo systems. Thanks to Christoph Naegeli and Andrea Gianarro for the following information.

Enter the build/generic directory in the xvid source directory, run bootstrap.sh and (for bash) run:

./configure --enable-macosx_module(这一步得否必须,有待确定)(不加这个,也可以正常操作)

特别提醒:修改platform.inc文件, 要在./configure 操作之后


Then edit build/generic/platform.inc and ADD the flags shown below:
第一个:"-undefined suppress" to SPECIFIC_CFLAGS(不添加这个也可链接成功)


第二个:"-f macho -DPREFIX" to AFLAGS (so it reads AFLAGS="AFLAGS=-I$(<D)/ -f macho 

                                                                                                -DPREFIX")
第三个:"-read_only_relocs suppress" to SPECIFIC_LDFLAGS()

Here’s my platform.inc if you would like to have a look to check you’ve edited it correctly.

Then make and make install as usual.

I also change -O2 to -O3 and add “-march=prescott” to the CFLAGS and configure with –prefix=/usr/local . The CFLAGS enable some GCC optimisations. There is debate as to whether the use of -march with “pentium-m” or “prescott” is better for the Core processors. I haven’t particularly researched it all that much but the Core is supposedly a heavily reworked Pentium 3 that is a bit like a Pentium M, has the same instruction set as the Prescott and behaves more like the NetBurst architecture. As such -march=prescott is supposed to be the most appropriate choice. When I get bored someday I’ll run some benchmarks and test to see which is faster.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值