简体   繁体   English

Makefile.am条件测试

[英]Makefile.am conditional test

I usually add to my home-made Makefile the following: 我通常将以下内容添加到我的自制Makefile中:

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

How can I do the same in a Makefile.am file? 如何在Makefile.am文件中执行相同的操作?

Here is a post that basically answers my question: http://wcang.blogspot.com/2008/05/conditional-compilation-based-on-target.html . 这是基本上可以回答我问题的帖子: http : //wcang.blogspot.com/2008/05/conditional-compilation-based-on-target.html So the solution is: 所以解决方案是:

configure.ac : configure.ac

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

Makefile.am : Makefile.am

if ARM
NEON=-mfpu=neon
else
NEON=
endif

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM