~elementary-apps/noise/trunk

« back to all changes in this revision

Viewing changes to .waf-1.6.2-ad4cc42bd7d347f7e283789e711b993f/waflib/Tools/dmd.py

  • Committer: Scott Ringwelski
  • Date: 2011-02-10 21:30:53 UTC
  • Revision ID: sgringwe@mtu.edu-20110210213053-d3c7mnexeref3cwj
sexy icons, sexy waf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
 
2
# encoding: utf-8
 
3
# WARNING! All changes made to this file will be lost!
 
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']=''
 
18
        v['D_TGT_F']=['-c','-of']
 
19
        v['D_LINKER']=v['D']
 
20
        v['DLNK_SRC_F']=''
 
21
        v['DLNK_TGT_F']='-of'
 
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']=['-quiet']
 
27
        v['DFLAGS_dshlib']=['-fPIC']
 
28
        v['LINKFLAGS_dshlib']=['-L-shared']
 
29
        v['DHEADER_ext']='.di'
 
30
        v['D_HDR_F']=['-H','-Hf']
 
31
def configure(conf):
 
32
        conf.find_dmd()
 
33
        conf.load('ar')
 
34
        conf.load('d')
 
35
        conf.common_flags_dmd()
 
36
        conf.d_platform_flags()
 
37
        if str(conf.env.D).find('ldc')>-1:
 
38
                conf.common_flags_ldc()
 
39
 
 
40
conf(find_dmd)
 
41
conf(common_flags_ldc)
 
42
conf(common_flags_dmd)
 
 
b'\\ No newline at end of file'