added support for compilation of cross platform utilities
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4272 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4bf6509225
commit
08665528b9
4 changed files with 29 additions and 13 deletions
|
@ -28,6 +28,10 @@ plugin_env = defenv.Copy(no_import_lib = 1)
|
|||
|
||||
util_env = defenv.Copy()
|
||||
|
||||
### cross-platform util environment
|
||||
|
||||
cp_util_env = util_env.Copy()
|
||||
|
||||
# return
|
||||
|
||||
Return('stub_env makensis_env plugin_env util_env')
|
||||
Return('stub_env makensis_env plugin_env util_env cp_util_env')
|
||||
|
|
|
@ -70,19 +70,23 @@ plugin_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
|||
plugin_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||
plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
|
||||
### cross-platform util environment
|
||||
|
||||
cp_util_env = defenv.Copy()
|
||||
|
||||
cp_util_env.Append(CCFLAGS = '-O2') # optimize
|
||||
cp_util_env.Append(CCFLAGS = '-Wall') # all warnings
|
||||
|
||||
cp_util_env.Append(LINKFLAGS = '-s') # strip
|
||||
cp_util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||
cp_util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
|
||||
### util environment
|
||||
|
||||
util_env = defenv.Copy()
|
||||
util_env = cp_util_env.Copy()
|
||||
cross_env(util_env)
|
||||
|
||||
util_env.Append(CCFLAGS = '-O2') # optimize
|
||||
util_env.Append(CCFLAGS = '-Wall') # all warnings
|
||||
|
||||
util_env.Append(LINKFLAGS = '-s') # strip
|
||||
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
||||
util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||
util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
|
||||
|
||||
### weird GCC requirements
|
||||
|
||||
|
@ -164,4 +168,4 @@ conf.Finish()
|
|||
|
||||
### return
|
||||
|
||||
Return('stub_env makensis_env plugin_env util_env')
|
||||
Return('stub_env makensis_env plugin_env util_env cp_util_env')
|
||||
|
|
|
@ -66,6 +66,10 @@ util_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
|||
util_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||||
util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
|
||||
### cross-platform util environment
|
||||
|
||||
cp_util_env = util_env.Copy()
|
||||
|
||||
# return
|
||||
|
||||
Return('stub_env makensis_env plugin_env util_env')
|
||||
Return('stub_env makensis_env plugin_env util_env cp_util_env')
|
||||
|
|
|
@ -185,6 +185,7 @@ stub_env = envs[0]
|
|||
makensis_env = envs[1]
|
||||
plugin_env = envs[2]
|
||||
util_env = envs[3]
|
||||
cp_util_env = envs[4]
|
||||
|
||||
######################################################################
|
||||
####### Aliases ###
|
||||
|
@ -365,8 +366,11 @@ for plugin in plugins:
|
|||
def BuildUtil(target, source, libs, entry = None, res = None,
|
||||
resources = None, defines = None, flags = None,
|
||||
nodeflib = False, install = None, install_as = None,
|
||||
examples = None, docs = None):
|
||||
env = util_env.Copy()
|
||||
examples = None, docs = None, cross_platform = False):
|
||||
if not cross_platform:
|
||||
env = util_env.Copy()
|
||||
else:
|
||||
env = cp_util_env.Copy()
|
||||
|
||||
AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue