waf

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

wscript (922B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # DragoonX6 2019
      4 
      5 # the following two variables are used by the target "waf dist"
      6 VERSION='0.0.1'
      7 APPNAME='hello_msvc'
      8 
      9 top = '.'
     10 
     11 from waflib.Configure import conf, ConfigurationContext
     12 from waflib.Options import OptionsContext
     13 
     14 def options(opt):
     15 	opt.load('clang_cross')
     16 
     17 def configure(conf):
     18 	conf.load('clang_cross')
     19 
     20 	if not conf.env.implib_PATTERN == '%s.lib':
     21 		conf.fatal('''clang is not configured to compile in msvc mode.
     22 Use flag '--clang-target-triple=x86_64-windows-msvc' to configure.
     23 On Windows you're likely to require running from an MSVC command prompt.
     24 On Linux you will need to have access to a Windows partition with VS installed, and the environment set up properly.
     25 See the ReadMe for more information.''')
     26 
     27 	conf.env.append_value('CFLAGS', conf.env.CFLAGS_CRT_MULTITHREADED_DLL)
     28 
     29 def build(bld):
     30 	bld.program(
     31 		source = 'hello.c',
     32 		target = 'hello_msvc')