Where to put makefile flags in a Xcode project?

南笙酒味 提交于 2019-12-11 20:18:31

问题


In the 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

Where should I put the above in Xcode project?


回答1:


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

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 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.

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

Xcode 4: Accessing Build Settings



来源:https://stackoverflow.com/questions/13449915/where-to-put-makefile-flags-in-a-xcode-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!