c¶
Base for c programs/libraries
-
waflib.Tools.c.
c_hook
(self, node)[source]¶ Bind the c file extension to the creation of a
waflib.Tools.c.c
instance
-
class
waflib.Tools.c.
c
(*k, **kw)[source]¶ Bases:
waflib.Task.Task
Compile C files into object files
-
vars
= ['ARCH', 'ARCH_ST', 'CC', 'CCDEPS', 'CC_SRC_F', 'CC_TGT_F', 'CFLAGS', 'CPPFLAGS', 'CPPPATH_ST', 'DEFINES', 'DEFINES_ST', 'FRAMEWORKPATH', 'FRAMEWORKPATH_ST', 'INCPATHS']¶
-
ext_in
= ['.h']¶
-
scan
(task)¶ Get the dependencies using a c/c++ preprocessor, this is required for finding dependencies of the kind:
#include some_macro()
This function is bound as a task method on
waflib.Tools.c.c
andwaflib.Tools.cxx.cxx
for example
-
__doc__
= 'Compile C files into object files'¶
-
__module__
= 'waflib.Tools.c'¶
-
hcode
= '${CC} ${ARCH_ST:ARCH} ${CFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CC_SRC_F}${SRC} ${CC_TGT_F}${TGT[0].abspath()}'¶
-
orig_run_str
= '${CC} ${ARCH_ST:ARCH} ${CFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CC_SRC_F}${SRC} ${CC_TGT_F}${TGT[0].abspath()}'¶
-
-
class
waflib.Tools.c.
cprogram
(*k, **kw)[source]¶ Bases:
waflib.Tools.ccroot.link_task
Link object files into a c program
-
ext_out
= ['.bin']¶
-
vars
= ['ARCH', 'ARCH_ST', 'CCLNK_SRC_F', 'CCLNK_TGT_F', 'FRAMEWORK', 'FRAMEWORKPATH', 'FRAMEWORKPATH_ST', 'FRAMEWORK_ST', 'LDFLAGS', 'LIB', 'LIBPATH', 'LIBPATH_ST', 'LIB_ST', 'LINKDEPS', 'LINKFLAGS', 'LINK_CC', 'RPATH', 'RPATH_ST', 'SHLIB_MARKER', 'STLIB', 'STLIBPATH', 'STLIBPATH_ST', 'STLIB_MARKER', 'STLIB_ST']¶
-
inst_to
= '${BINDIR}'¶
-
__doc__
= 'Link object files into a c program'¶
-
__module__
= 'waflib.Tools.c'¶
-
hcode
= '${LINK_CC} ${LINKFLAGS} ${CCLNK_SRC_F}${SRC} ${CCLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB} ${LDFLAGS}'¶
-
orig_run_str
= '${LINK_CC} ${LINKFLAGS} ${CCLNK_SRC_F}${SRC} ${CCLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB} ${LDFLAGS}'¶
-
-
class
waflib.Tools.c.
cshlib
(*k, **kw)[source]¶ Bases:
waflib.Tools.c.cprogram
Link object files into a c shared library
-
inst_to
= '${LIBDIR}'¶
-
__doc__
= 'Link object files into a c shared library'¶
-
__module__
= 'waflib.Tools.c'¶
-
hcode
= 'nocode'¶
-
-
class
waflib.Tools.c.
cstlib
(*k, **kw)[source]¶ Bases:
waflib.Tools.ccroot.stlink_task
Link object files into a c static library
-
__doc__
= 'Link object files into a c static library'¶
-
__module__
= 'waflib.Tools.c'¶
-
hcode
= '\tdef wrap(self):\n\t\ttry: os.remove(self.outputs[0].abspath())\n\t\texcept OSError: pass\n\t\treturn old(self)\n'¶
-
-
class
waflib.Tools.c.
link_task
(*k, **kw)[source]¶ Bases:
waflib.Task.Task
Base class for all link tasks. A task generator is supposed to have at most one link task bound in the attribute link_task. See
waflib.Tools.ccroot.apply_link()
.-
__doc__
= '\n\tBase class for all link tasks. A task generator is supposed to have at most one link task bound in the attribute *link_task*. See :py:func:`waflib.Tools.ccroot.apply_link`.\n\n\t.. inheritance-diagram:: waflib.Tools.ccroot.stlink_task waflib.Tools.c.cprogram waflib.Tools.c.cshlib waflib.Tools.cxx.cxxstlib waflib.Tools.cxx.cxxprogram waflib.Tools.cxx.cxxshlib waflib.Tools.d.dprogram waflib.Tools.d.dshlib waflib.Tools.d.dstlib waflib.Tools.ccroot.fake_shlib waflib.Tools.ccroot.fake_stlib waflib.Tools.asm.asmprogram waflib.Tools.asm.asmshlib waflib.Tools.asm.asmstlib\n\t'¶
-
__module__
= 'waflib.Tools.ccroot'¶
-
add_target
(target)[source]¶ Process the target attribute to add the platform-specific prefix/suffix such as .so or .exe. The settings are retrieved from
env.clsname_PATTERN
-
chmod
= 493¶
-
color
= 'YELLOW'¶
-
hcode
= '\tdef run(self):\n\t\t"""\n\t\tCalled by threads to execute the tasks. The default is empty and meant to be overridden in subclasses.\n\t\tIt is a bad idea to create nodes in this method (so, no node.ant_glob)\n\n\t\t:rtype: int\n\t\t"""\n\t\tif hasattr(self, \'fun\'):\n\t\t\treturn self.fun(self)\n\t\treturn 0\n'¶
-
-
class
waflib.Tools.c.
stlink_task
(*k, **kw)[source]¶ Bases:
waflib.Tools.ccroot.link_task
Base for static link tasks, which use ar most of the time. The target is always removed before being written.
-
__doc__
= '\n\tBase for static link tasks, which use *ar* most of the time.\n\tThe target is always removed before being written.\n\t'¶
-
__module__
= 'waflib.Tools.ccroot'¶
-
chmod
= 420¶
-
hcode
= '${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'¶
-
orig_run_str
= '${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'¶
-
vars
= ['AR', 'ARFLAGS', 'AR_SRC_F', 'AR_TGT_F']¶
-