blob: da966ec02a061767baaab9169c92c8ca9a5c90a7 [file] [log] [blame]
akmhoquefa8ee9b2014-03-14 09:06:24 -05001#! /usr/bin/env python
2# encoding: utf-8
3# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
5import sys
6from waflib.Tools import ar,d
7from waflib.Configure import conf
8@conf
9def find_gdc(conf):
10 conf.find_program('gdc',var='D')
11 out=conf.cmd_and_log([conf.env.D,'--version'])
12 if out.find("gdc ")==-1:
13 conf.fatal("detected compiler is not gdc")
14@conf
15def common_flags_gdc(conf):
16 v=conf.env
17 v['DFLAGS']=[]
18 v['D_SRC_F']=['-c']
19 v['D_TGT_F']='-o%s'
20 v['D_LINKER']=v['D']
21 v['DLNK_SRC_F']=''
22 v['DLNK_TGT_F']='-o%s'
23 v['DINC_ST']='-I%s'
24 v['DSHLIB_MARKER']=v['DSTLIB_MARKER']=''
25 v['DSTLIB_ST']=v['DSHLIB_ST']='-l%s'
26 v['DSTLIBPATH_ST']=v['DLIBPATH_ST']='-L%s'
27 v['LINKFLAGS_dshlib']=['-shared']
28 v['DHEADER_ext']='.di'
29 v.DFLAGS_d_with_header='-fintfc'
30 v['D_HDR_F']='-fintfc-file=%s'
31def configure(conf):
32 conf.find_gdc()
33 conf.load('ar')
34 conf.load('d')
35 conf.common_flags_gdc()
36 conf.d_platform_flags()