在 Xcode 项目中将 makefile 标志放在哪里? [英] Where to put makefile flags in a Xcode project?

查看:31
本文介绍了在 Xcode 项目中将 makefile 标志放在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在生成文件中:

 CUSTOM_CFLAGS=-Wall -ggdb3 -O3 -std=gnu99 -frename-registers -pthread -Wsign-compare -D_GNU_SOURCE

 SYS_CFLAGS=-DNO_THREAD_LOCAL
 LDFLAGS=-pthread -rdynamic
 LIBS=-lm -ldl

我应该将上述内容放在 Xcode 项目中的什么位置?

Where should I put the above in Xcode project?

推荐答案

Makefile 标志对应于 Xcode 构建设置.查看以下构建设置:

Makefile flags correspond to Xcode build settings. Look into the following build settings:

-O3 标志的优化级别.-std=gnu99 标志的 C 语言方言.其他 C 标志用于 CUSTOM_CFLAGS 和 SYS_CFLAGS 标志中的其他标志.LDFLAGS 和 LIBS 标志的其他链接器标志.

Optimization Level for the -O3 flag. C Language Dialect for the -std=gnu99 flag. Other C Flags for the other flags in the CUSTOM_CFLAGS and SYS_CFLAGS flags. Other Linker Flags for the LDFLAGS and LIBS flags.

Xcode 可能对 makefile 的 CUSTOM_CFLAGS 标志列表和链接器标志中的某些标志进行了构建设置.我还没有记住构建设置列表.如果您打开快速帮助检查器,您可以通过从构建设置列表中选择构建设置来阅读每个构建设置的说明.选择视图">实用工具">显示快速帮助检查器"以显示快速帮助检查器".

Xcode may have build settings for some of the flags in the makefile's CUSTOM_CFLAGS flag list and the linker flags. I haven't memorized the build settings list. If you open the Quick Help inspector, you can read a description of each build setting by selecting the build setting from the build settings list. Choose View > Utilities > Show Quick Help Inspector to show the Quick Help inspector.

如果您不知道在哪里可以找到 Xcode 的构建设置,请阅读以下文章:

If you don't know where to find Xcode's build settings, read the following article:

Xcode 4:访问构建设置

这篇关于在 Xcode 项目中将 makefile 标志放在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆