Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>No, there isn't, but the migration isn't that complex.</p> <p>If you've never used waf before, look at an example from the <code>demos/</code> folder (<code>c</code> is the typical one), and digest the <strong>waf book</strong>.</p> <p>Then, from make to waf:</p> <ul> <li><p>in the configure step, materialized by the <code>configure()</code> function, instanciate the needed high-level tools and define the relations to external libraries using high-level tools if possible (eg. <code>check_cfg()</code> handles <code>pkg-config(1)</code>) or fall back in defining <code>{DEFINES,INCLUDE,LIB,...}_$LIBNAME</code>, eg:</p> <pre><code>def configure(cfg): # I want to do C with any available compiler cfg.load("compiler_c") # will detect MSVC, GCC, or other common compilers # always include cwd cfg.env.INCLUDES += ['.'] # I want to link all my programs with pthread cfg.env.LIB += ['pthread'] # I want to link with static zlib cfg.env.STLIB_Z += ['z'] # I want to use pkg-config to tell me how to link with pjsip # and avoid typing the risky -DPJ_AUTOCONF=1 -pipe -O2 -march=k8-sse3 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=64 l1-cache-line-size=64 l2-cache-size=512 -mtune=k8 -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -I/home/portage/tmp/net-libs-pjsip-1.12/image//usr/include -L/home/portage/tmp/net-libs-pjsip-1.12/image//usr/lib -lpjsua -lpjsip-ua -lpjsip-simple -lpjsip -lpjmedia-codec -lpjmedia -lpjmedia-audiodev -lpjnath -lpjlib-util -lresample -lmilenage -lsrtp -lg7221codec -lpj -lm -luuid -lnsl -lrt -lpthread -lasound -lcrypto -lssl -lopencore-amrnb # the *_PJSIP variables will be created cfg.check_cfg( package='libpjproject', uselib_store='PJSIP', args='--libs --cflags', ) </code></pre> <p>avoid using <code>*FLAGS</code> if possible, as they are compiler-specific.</p></li> <li><p>replace standard makefile rules by high level rules (using tools instanciated in <code>configure()</code>), eg.</p> <pre><code>bld( target='mylib', features='c', # see note source=['a.c', 'b.c'], use=['Z', 'PJSIP'], ) bld( target='name', features='c cprogram', source=['main.c'], use=['mylib'], ) </code></pre></li> <li><p>non-standard rules and high-level tools can be created if needed, see waf book</p></li> </ul> <p>Overall, the build scripts will be shorter and easier to read than makefiles. They are more linear, and their content is more semantical.</p> <p>Note that you don't <em>need</em> to create static libraries if you don't plan to export them. waf tools does not use the shell to call programs, so the command-line length limit (main reason to create internal static libs) is not a problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload