📄 win32-psos-arm.cf
字号:
# -*- python -*-## ***** BEGIN LICENSE BLOCK *****# Source last modified: $Id: win32-psos-arm.cf,v 1.4 2004/10/07 17:08:54 rishimathew Exp $# # Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.# # The contents of this file, and the files included with this file,# are subject to the current version of the RealNetworks Public# Source License (the "RPSL") available at# http://www.helixcommunity.org/content/rpsl unless you have licensed# the file under the current version of the RealNetworks Community# Source License (the "RCSL") available at# http://www.helixcommunity.org/content/rcsl, in which case the RCSL# will apply. You may also obtain the license terms directly from# RealNetworks. You may not use this file except in compliance with# the RPSL or, if you have a valid RCSL with RealNetworks applicable# to this file, the RCSL. Please see the applicable RPSL or RCSL for# the rights, obligations and limitations governing use of the# contents of the file.# # Alternatively, the contents of this file may be used under the# terms of the GNU General Public License Version 2 or later (the# "GPL") in which case the provisions of the GPL are applicable# instead of those above. If you wish to allow use of your version of# this file only under the terms of the GPL, and not to allow others# to use your version of this file under the terms of either the RPSL# or RCSL, indicate your decision by deleting the provisions above# and replace them with the notice and other provisions required by# the GPL. If you do not delete the provisions above, a recipient may# use your version of this file under the terms of any one of the# RPSL, the RCSL or the GPL.# # This file is part of the Helix DNA Technology. RealNetworks is the# developer of the Original Code and owns the copyrights in the# portions it created.# # This file, and the files included with this file, is distributed# and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY# KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS# ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET# ENJOYMENT OR NON-INFRINGEMENT.# # Technology Compatibility Kit Test Suite(s) Location:# http://www.helixcommunity.org/content/tck# # Contributor(s):# # ***** END LICENSE BLOCK *****# """Settings to build ARM libs for PSOS with ADS compiler on i386 Windows."""exec_config_file('win32-psos.cf')exec_config_file('win-nmake.cf')project.AddBuildOption('nodll')project.AddBuildOption('static')project.AddBuildOption('static_only')if project.build_choices.count("dynamic"): print "*** -t dynamic is not supported." project.RemoveBuildOption('dynamic')platform.include_arg = '-I'platform.define_arg = '-D'platform.object_suffix = 'o'platform.shared_object_suffix = 'obj'## suffixes for target typesplatform.library_suffix = 'lib'platform.make_lib.cmd = 'armar -create'#satya_temp platform.make_lib.cmd = 'armlink -partial -info sizes,totals,unused -map -list ptl.map -output'platform.make_lib.make_var = 'MAKE_LIB'platform.make_lib.make_flags = 'MAKE_LIB_FLAGS'## list of PCF files to runplatform.pcf_prefix_list = platform.pcf_prefix_list + ['psos_arm']project.AddDefines("ARM_COTULLA")project.AddDefines('ARM', '_ARM', '_PSOS', '_UNIX_THREADED_NETWORK_IO', 'HELIX_CONFIG_DISABLE_ATOMIC_OPERATORS', # until we have a real implementation 'HELIX_CONFIG_FIXEDPOINT' # use fixed point implementation where possible. )if project.BuildOption('arm_thumb'): project.AddDefines('ARM_THUMB')else: project.AddDefines('ARM_ADS')## suffixes for target typesplatform.exe_suffix = 'a'## Compiler Classclass ARMCompiler(Compiler): def __init__(self): Compiler.__init__(self) def execute(self, target_file, src_file): extra_args = '' return form_string( platform.form_var(self.make_var), platform.form_var(self.make_flags), extra_args, self.target_arg + target_file, self.source_arg, src_file)class ARMAssembler(Compiler): def __init__(self): Compiler.__init__(self) def setup_flags_var(self): def_str = form_string(platform.form_var("INCLUDES")) return form_string(self.make_flags, '=', self.form_args(), def_str)## instance compiler objectplatform.cc = ARMCompiler()platform.cxx = ARMCompiler()platform.asm = ARMAssembler()cc = platform.cccxx = platform.cxxif project.IsDefined('ARM_ADS'): cxx.cmd = 'armcpp' cc.cmd = 'armcpp -ansi'else: cxx.cmd = 'tcpp' cc.cmd = 'tcpp' cxx.source_arg = cc.source_arg = '-c 'cxx.target_arg = cc.target_arg = '-o'cxx.make_var = 'CXX'cc.make_var = 'CC'cxx.make_flags = 'CXXFLAGS'cc.make_flags = 'CCFLAGS'cxx.include_arg = cc.include_arg = '-I'asm = platform.asmasm.cmd = 'armasm'asm.source_arg = ' 'asm.make_var = 'ARMASM'asm.make_flags = 'ARMASMFLAGS'asm.target_arg = '-o'asm.include_arg = '-I'asm.args['debug'] = '-g'platform.build_rules['.s'] = BuildRule('.s', '.obj', asm)## PLAYER_HELIX Changed for a smaller footprint ## cxx.args['debug'] = cc.args['debug'] = '-g -O0'cxx.args['debug'] = cc.args['debug'] = '-O2 -Otime -Oldrd -g -dwarf2'## no_optimize: no optimization on release buildsif project.BuildOption('no_optimize'): cc.args['release'] = '-g- -O0'else: cc.args['release'] = '-g- -O2'cxx.args['release'] = cc.args['release']def ARMTimeOptimize(): cc.args['default'] = cc.args['default'] + ' -Otime -Oldrd' cxx.args['default'] = cxx.args['default'] + ' -Otime -Oldrd'class ARMLinker(Linker2): def __init__(self): Linker2.__init__(self) ## these are here to emulate the old linker class ## for Umakefil/*.pcf files which do direct modification ## of this class self.def_file = "" self.implib_file = "" self.args = {} self.args["default"] = "" self.args["debug"] = "" self.args["release"] = "" self.args["dll"] = "" def link_paths(self): return string.join(platform.system_paths) +\ string.join(project.system_paths) def LinkLIB(self, target_path, objects): cmd_list = [] cmd = "%s %s %s" % (platform.make_lib.cmd, target_path, objects) cmd_list.append(cmd) return cmd_list def CleanLIB(self, target_path): return [target_path] def LinkDLL(self, target_path, objects, static_libs, dynamic_libs): # XXXSAB fill this in return ['echo %s' % target_path] def CleanDLL(self, target_path): list = [] list.append(target_path) return list def LinkEXE(self, target_path, objects, static_libs, dynamic_libs): cmd_list = [] arg_list = ['-remove -verbose -errors errors.txt -info sizes,totals,unused -map -list image.map -output', target_path]# arg_list = ['-create', target_path] arg_list.append(self.link_paths()) arg_list.append(objects) libs = project.libraries + project.libraries2 + \ project.local_libs + project.module_libs + \ project.dynamic_libraries + \ project.sys_libraries for lib in libs: arg_list = arg_list + [lib] cmd = "armlink %s" % (string.join(arg_list)) cmd_list.append(cmd) return cmd_list def CleanEXE(self, target_path): list = [] list.append(target_path) return listplatform.link = ARMLinker()## target pathsproject.output_dir = '%sarm' % project.output_dir
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -