Makefile.am条件测试

时间:2014-06-03 20:43:22

标签: makefile

我通常会在我的自制Makefile中添加以下内容:

ifeq ($(shell uname -m),armv7l)
ADDITIONAL := -mfpu=neon
endif

如何在Makefile.am文件中执行相同操作?

1 个答案:

答案 0 :(得分:2)

这是一篇基本上回答了我的问题的帖子:http://wcang.blogspot.com/2008/05/conditional-compilation-based-on-target.html。所以解决方案是:

configure.ac

AM_CONDITIONAL(ARM, test `uname -m` = "armv7l")

Makefile.am

if ARM
NEON=-mfpu=neon
else
NEON=
endif
相关问题