~ubuntu-branches/ubuntu/raring/xmms2/raring

« back to all changes in this revision

Viewing changes to waflib/Tools/dmd.py

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-11-25 19:23:15 UTC
  • mto: This revision was merged to the branch mainline in revision 51.
  • Revision ID: package-import@ubuntu.com-20121125192315-m9z6nu9wwlzrrz9z
ImportĀ upstreamĀ versionĀ 0.8+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
 
2
# encoding: utf-8
 
3
# WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file
 
4
 
 
5
import sys
 
6
from waflib.Tools import ar,d
 
7
from waflib.Configure import conf
 
8
def find_dmd(conf):
 
9
        conf.find_program(['dmd','ldc'],var='D')
 
10
def common_flags_ldc(conf):
 
11
        v=conf.env
 
12
        v['DFLAGS']=['-d-version=Posix']
 
13
        v['LINKFLAGS']=[]
 
14
        v['DFLAGS_dshlib']=['-relocation-model=pic']
 
15
def common_flags_dmd(conf):
 
16
        v=conf.env
 
17
        v['D_SRC_F']=['-c']
 
18
        v['D_TGT_F']='-of%s'
 
19
        v['D_LINKER']=v['D']
 
20
        v['DLNK_SRC_F']=''
 
21
        v['DLNK_TGT_F']='-of%s'
 
22
        v['DINC_ST']='-I%s'
 
23
        v['DSHLIB_MARKER']=v['DSTLIB_MARKER']=''
 
24
        v['DSTLIB_ST']=v['DSHLIB_ST']='-L-l%s'
 
25
        v['DSTLIBPATH_ST']=v['DLIBPATH_ST']='-L-L%s'
 
26
        v['LINKFLAGS_dprogram']=['-quiet']
 
27
        v['DFLAGS_dshlib']=['-fPIC']
 
28
        v['LINKFLAGS_dshlib']=['-L-shared']
 
29
        v['DHEADER_ext']='.di'
 
30
        v.DFLAGS_d_with_header=['-H','-Hf']
 
31
        v['D_HDR_F']='%s'
 
32
def configure(conf):
 
33
        conf.find_dmd()
 
34
        conf.load('ar')
 
35
        conf.load('d')
 
36
        conf.common_flags_dmd()
 
37
        conf.d_platform_flags()
 
38
        if str(conf.env.D).find('ldc')>-1:
 
39
                conf.common_flags_ldc()
 
40
 
 
41
conf(find_dmd)
 
42
conf(common_flags_ldc)
 
43
conf(common_flags_dmd)
 
 
b'\\ No newline at end of file'