2
#This file is a part of the NVDA project.
3
#URL: http://www.nvda-project.org/
4
#Copyright 2006-2010 NVDA contributers.
5
#This program is free software: you can redistribute it and/or modify
6
#it under the terms of the GNU General Public License version 2.0, as published by
7
#the Free Software Foundation.
8
#This program is distributed in the hope that it will be useful,
9
#but WITHOUT ANY WARRANTY; without even the implied warranty of
10
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
#This license can be found at:
12
#http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
26
TARGET_ARCH=env['TARGET_ARCH']
27
debug=env['nvdaHelperDebugFlags']
29
#Some defines and includes for the environment
30
env.Append(CPPDEFINES=['UNICODE','_CRT_SECURE_NO_DEPRECATE',('LOGLEVEL','${nvdaHelperLogLevel}'),('_WIN32_WINNT','_WIN32_WINNT_WINXP')])
31
env.Append(CXXFLAGS=['/EHsc','/W3','/WX'])
32
env.Append(CPPPATH=['#/include',Dir('.').abspath])
33
env.Append(LINKFLAGS='/incremental:no')
34
env.Append(LINKFLAGS='/release') #We always want a checksum in the header
35
env.Append(MIDLFLAGS='/x64' if TARGET_ARCH=='x86_64' else '/win32')
37
if 'noOptimize' in debug:
38
env.Append(CCFLAGS=['/Od'])
40
env.Append(CCFLAGS=['/O2','/GL'])
41
env.Append(LINKFLAGS=['/LTCG'])
43
if 'debugCRT' in debug:
44
env.Append(CCFLAGS=['/MTd'])
46
env.Append(CCFLAGS=['/MT'])
47
env.Append(CPPDEFINES=['NDEBUG'])
50
env.Append(CCFLAGS=['/RTCsu'])
52
if 'symbols' in debug:
53
env.Append(PDB='${TARGET}.pdb')
54
env.Append(LINKFLAGS='/OPT:REF') #having symbols usually turns this off but we have no need for unused symbols
58
acrobatAccessRPCStubs=env.SConscript('acrobatAccess_sconscript')
59
Export('acrobatAccessRPCStubs')
60
if TARGET_ARCH=='x86':
61
env.Install(sourceTypelibDir,acrobatAccessRPCStubs[0]) #typelib
63
ia2RPCStubs=env.SConscript('ia2_sconscript')
65
env.Install(libInstallDir,ia2RPCStubs[0]) #proxy dll
66
if TARGET_ARCH=='x86':
67
env.Install(sourceTypelibDir,ia2RPCStubs[1]) #typelib
69
if TARGET_ARCH=='x86':
70
localLib=env.SConscript('local/sconscript')
72
env.Install(libInstallDir,localLib)
74
clientLib=env.SConscript('client/sconscript')
76
env.Install(clientInstallDir,clientLib)
78
minHookLib=env.SConscript('minHook/sconscript')
80
env.Install(libInstallDir,minHookLib)
82
remoteLib=env.SConscript('remote/sconscript')
84
env.Install(libInstallDir,remoteLib)
86
if TARGET_ARCH=='x86_64':
87
remoteLoaderProgram=env.SConscript('remoteLoader/sconscript')
88
env.Install(libInstallDir,remoteLoaderProgram)
90
vbufBaseStaticLib=env.SConscript('vbufBase/sconscript')
91
Export('vbufBaseStaticLib')
93
adobeAcrobatVBufBackend=env.SConscript('vbufBackends/adobeAcrobat/sconscript')
94
env.Install(libInstallDir,adobeAcrobatVBufBackend)
96
adobeFlashVBufBackend=env.SConscript('vbufBackends/adobeFlash/sconscript')
97
env.Install(libInstallDir,adobeFlashVBufBackend)
99
geckoVBufBackend=env.SConscript('vbufBackends/gecko_ia2/sconscript')
100
env.Install(libInstallDir,geckoVBufBackend)
102
mshtmlVBufBackend=env.SConscript('vbufBackends/mshtml/sconscript')
103
env.Install(libInstallDir,mshtmlVBufBackend)
105
if TARGET_ARCH=='x86' and os.path.isdir(Dir('#include/espeak').abspath):
106
env.SConscript('espeak/sconscript')
108
nvdajpime=env.SConscript('nvdajpime/sconscript') # Masataka Shinke
109
Export('nvdajpime') # Masataka Shinke
110
env.Install(clientInstallDir,nvdajpime) # Masataka Shinke
111
env.Install(libInstallDir,nvdajpime) # Masataka.Shinke
113
nvdajpimeRPC=env.SConscript('nvdajpimeRPC/sconscript') # Masataka Shinke
114
Export('nvdajpimeRPC') # Masataka Shinke
115
env.Install(clientInstallDir,nvdajpimeRPC) # Masataka Shinke
116
env.Install(libInstallDir,nvdajpimeRPC) # Masataka.Shinke
118
if TARGET_ARCH=='x86_64':
119
nvdajpimeLoaderProgram=env.SConscript('nvdajpimeLoader/sconscript')
120
env.Install(libInstallDir,nvdajpimeLoaderProgram)
122
if TARGET_ARCH=='x86' and os.path.isdir(Dir('#include/jtalk/libopenjtalk').abspath):
123
nvdajptextLib=env.SConscript('nvdajptext/sconscript')
124
Export('nvdajptextLib')
125
env.Install(libInstallDir,nvdajptextLib)