summaryrefslogtreecommitdiff
path: root/examples/winexe/wscript
blob: 6b311b1da41537cf6b997381b36031bc4eaf0c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python

def configure(conf):
    AR32 = ['i386', 'i586', 'i686']
    AR64 = ['x86_64', 'amd64']
    TC = ['mingw32', 'mingw32msvc', 'w64-mingw32']

    found = False

    for a in AR32:
        for t in TC:
            if conf.find_program(a + '-' + t + '-gcc', var='WINEXE_CC_WIN32'):
                found = True
                break
        if found:
            conf.DEFINE('HAVE_WINEXE_CC_WIN32', 1);
            break

    found = False

    for a in AR64:
        for t in TC:
            if conf.find_program(a + '-' + t + '-gcc', var='WINEXE_CC_WIN64'):
                found = True
                break
        if found:
            conf.DEFINE('HAVE_WINEXE_CC_WIN64', 1);
            break

    conf.DEFINE("WINEXE_LDFLAGS",
                "-s -Wall -Wl,-Bstatic -Wl,-Bdynamic -luserenv")