summaryrefslogtreecommitdiff
path: root/examples/winexe/wscript
blob: 3380b9794f6504babce23e075934de5ebec8ac41 (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
#!/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

    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")