waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (658B)


      1 #!/usr/bin/env python
      2 #Demo on embedding resources in executables
      3 
      4 """
      5 We embed the main.c source code in a section of the program.
      6 See http://gareus.org/wiki/embedding_resources_in_executables
      7 
      8 TODO: support for more toolchains
      9 """
     10 
     11 from waflib import Task
     12 from waflib.TaskGen import feature, before_method
     13 
     14 def options(opt):
     15 	opt.load('compiler_c')
     16 	opt.load('file_to_object')
     17 
     18 def configure(cfg):
     19 	cfg.load('compiler_c')
     20 	cfg.load('file_to_object')
     21 
     22 def build(bld):
     23 	bld(
     24 	 name='example',
     25 	 source='main.c',
     26 	 features='file_to_object',
     27 	 includes_nodes=[],
     28 	)
     29 	bld(
     30 	 target = 'app',
     31 	 features = 'c cprogram',
     32 	 source = 'main.c',
     33 	 use='example',
     34 	)
     35