?? symbian-armv5.cf
字號:
# -*- python -*-
#
# ***** BEGIN LICENSE BLOCK *****
# Source last modified: $Id: symbian-armv5.cf,v 1.3 2004/12/08 23:24:16 pankajgupta 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 *****
#
"""Generic symbian armv5 .cf file. Common stuff to all symbian armv5 builds."""
exec_config_file('symbian.cf')
platform.include_arg = '-J'
platform.define_arg = '-D'
platform.object_suffix = 'o'
platform.shared_object_suffix = 'o'
platform.path_sep = '/'
## Symbian PCF file list
platform.pcf_prefix_list[-1:-1] = ['symbian-armv5']
## Turn these on for device builds.
project.AddDefines( '__MARM_ARMV5__',
'__ARMCC__',
'__EPOC32__',
'__MARM__',
'__SYMBIAN32__',
'_UNICODE',
'_EPOC',
'__EABI__',
'__DLL__',
'ARM_ADS',
'_ARM_',
'_RVCT_'
)
## common defines for release and debug.
if project.BuildOption("debug"):
project.AddDefines("_DEBUG", "DEBUG", "HELIX_FEATURE_DPRINTF")
if project.BuildOption("release"):
project.AddDefines("NDEBUG")
project.RemoveSystemLibraries("euser.lib" );
## Compiler Class
class SymbianARMV5Compiler(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('')
return form_string(self.make_flags, '=', self.form_args(), def_str)
platform.cc = SymbianARMV5Compiler()
platform.cxx = SymbianARMV5Compiler()
platform.asm = ARMAssembler()
cc = platform.cc
cxx = platform.cxx
cc.cmd = 'armcc'
cxx.cmd = 'armcc'
cxx.source_arg = cc.source_arg = '-c'
cxx.target_arg = cc.target_arg = '-o '
cxx.make_var = cc.make_var = 'CC'
cxx.make_flags = 'CXXFLAGS'
cc.make_flags = 'CCFLAGS'
cxx.include_arg = cc.include_arg = '-J'
asm = platform.asm
asm.cmd = 'armasm'
asm.source_arg = ' '
asm.make_var = 'ARMASM'
asm.make_flags = 'ARMASMFLAGS'
asm.target_arg = '-o'
asm.include_arg = '-I'
asm.args['default'] = ' '
asm.args['debug'] = ' '
platform.build_rules['.s'] = BuildRule('.s', '.obj', asm)
if project.BuildOption("release"):
cc.args['default'] = '-c --diag_suppress 3161,611,654,997,1152,1300 --diag_error 1267 --cpu 5T --enum_is_int -Ono_known_library --fpu softvfp --fpmode ieee_full --dll_vtbl --no_vfe -apcs /interwork -W -g- -O2 -D__PRODUCT_INCLUDE__="bldvariant.hrh" --cpp --preinclude RVCT2_1.h'
else:
cc.args['default'] = '-c --diag_suppress 3161,611,654,997,1152,1300 --diag_error 1267 --cpu 5T --enum_is_int -Ono_known_library --fpu softvfp --fpmode ieee_full --dll_vtbl --no_vfe -apcs /interwork -W -g -O2 -D__PRODUCT_INCLUDE__="bldvariant.hrh" --cpp --preinclude RVCT2_1.h'
cxx.args['default'] = cc.args['default']
cxx.args['debug'] = cc.args['debug'] = ''
asm.args['debug'] = ''
## no_optimize: no optimization on release builds
if project.BuildOption('no_optimize'):
cc.args['release'] = ''
else:
cc.args['release'] = '-O2'
cxx.args['release'] = cc.args['release']
asm.args['release'] = ''
class SymbianARMILinker(Linker2):
def link_script_path(self):
return "%s.lnk" % (project.TargetName())
def write_link_script(self):
## if there are no exported functions, die here
if len(project.exported_func) == 0:
umake_lib.fatal("dll target without exported functions")
path=self.link_script_path()
## create a gcc link script
fil = open(path, "w")
for export in project.exported_func:
fil.write("EXTERN(%s);\n" % (export))
fil.close()
return path
# def armerge_lib_path(self):
# libname = "%s_libs.%s" % (project.target_name, platform.library_suffix)
# return os.path.join(project.output_dir, libname)
# def armerge_tmp_path(self):
# return os.path.join(project.object_dir, "lib")
# def AddARMerge(self, cmd_list, static_libs):
#
# We use the armerge script to merge all the static libs into
# one big one so that our one pass linker won't have troubles
# with the circular dependancies. After this armerge is run
# use mergedlibpath instead of static_libs.
#
# armerge_cmd = os.path.join(BUILD_ROOT, "bin", "armerge")
# tmpMergePath = self.armerge_tmp_path()
# mergedLibPath = self.armerge_lib_path()
# cmd = "python %s -d %s %s %s" % (armerge_cmd,
# tmpMergePath,
# mergedLibPath,
# static_libs)
# cmd_list.append(cmd)
# return mergedLibPath
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"] = "/debug"
self.args["release"] = "/OPT:REF"
self.args["dll"] = ""
def read_ordinal_file(self, path):
fil = open(path, "r")
sym_ord_list = []
for line in fil.readlines():
field_list = string.split(line)
symbol = string.strip(field_list[1])
ordinal = string.strip(field_list[0])
sym_ord_list.append((symbol, ordinal))
return sym_ord_list
def write_def_file(self, path):
fil = open(path, 'w')
ordinalFilename = "%s_ordinal.dat" % project.target_name
if project.target_type == "dll":
## exported functions
fil.write("EXPORTS\n")
## check for the data file which defines ordinally-exported
## methods/functions
if project.BuildOption("ordinal") and \
os.path.isfile(ordinalFilename):
for (symbol, ordinal) in self.read_ordinal_file(ordinalFilename):
fil.write("\t%s @ %s R3UNUSED\n" % (symbol, ordinal))
fil.close()
def LinkLIB(self, target_path, objects):
cmd_list = []
cmd = '-rm %s' % target_path
cmd_list.append(cmd)
arg_list = ["-r -v", target_path, objects]
cmd = '"armar.exe " %s' % (string.join(arg_list))
cmd_list.append(cmd)
cmd = '"armar.exe -s" %s' % (target_path)
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):
cmd_list = []
baseName = re.match("^(.+)\.dll$", target_path).group(1)
# mergedLibPath = self.AddARMerge( cmd_list, static_libs)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -