diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-04-03 13:38:31 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-04-03 13:38:31 +0900 |
commit | f801386f0c7051085da9d6ca660642f3aa08c81e (patch) | |
tree | 84658687f9f6b4df861d76f76b141cff71dd8d3f /doc/extension.rdoc | |
parent | 7648bae4c86121b0b259587da11d27297c248633 (diff) |
[DOC] Describe append_{c,cpp,ld}flagsv3_2_0_preview1
Diffstat (limited to 'doc/extension.rdoc')
-rw-r--r-- | doc/extension.rdoc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc index 30800c2435..01bbcd816b 100644 --- a/doc/extension.rdoc +++ b/doc/extension.rdoc @@ -956,6 +956,9 @@ need to put at the top of the file. You can use the functions below to check various conditions. + append_cppflags(array-of-flags[, opt]): append each flag to $CPPFLAGS if usable + append_cflags(array-of-flags[, opt]): append each flag to $CFLAGS if usable + append_ldflags(array-of-flags[, opt]): append each flag to $LDFLAGS if usable have_macro(macro[, headers[, opt]]): check whether macro is defined have_library(lib[, func[, headers[, opt]]]): check whether library containing function exists find_library(lib[, func, *paths]): find library from paths @@ -984,6 +987,10 @@ The value of the variables below will affect the Makefile. $LDFLAGS: included in LDFLAGS make variable (such as -L) $objs: list of object file names +Compiler/linker flags are not portable usually, you should use ++append_cppflags+, +append_cpflags+ and +append_ldflags+ respectively +instead of appending the above variables directly. + Normally, the object files list is automatically generated by searching source files, but you must define them explicitly if any sources will be generated while building. |