forked from PAWPAW-Mirror/lib_xua
Bump version
This commit is contained in:
committed by
Oscar Bailey
parent
9d84debefd
commit
f1ba1dace8
@@ -1,6 +1,11 @@
|
|||||||
lib_xua Change Log
|
lib_xua Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
0.3.0
|
||||||
|
-----
|
||||||
|
|
||||||
|
* CHANGED: Build files updated to support new "xcommon" behaviour in xwaf.
|
||||||
|
|
||||||
0.2.0
|
0.2.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
VERSION = 0.2.0
|
VERSION = 0.3.0
|
||||||
|
|
||||||
DEPENDENT_MODULES = lib_logging(>=2.1.0) \
|
DEPENDENT_MODULES = lib_logging(>=2.1.0) \
|
||||||
lib_xassert(>=2.0.0) \
|
lib_xassert(>=2.0.0) \
|
||||||
|
|||||||
109
lib_xua/wscript
109
lib_xua/wscript
@@ -1,109 +0,0 @@
|
|||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
def create_list_from_make_flag(bld, list_of_flags):
|
|
||||||
for i, flag in enumerate(list_of_flags):
|
|
||||||
if flag.startswith('$('):
|
|
||||||
for f in bld.env[flag.strip('$()')]:
|
|
||||||
list_of_flags.insert(i, f)
|
|
||||||
i += 1
|
|
||||||
list_of_flags.remove(flag)
|
|
||||||
return list_of_flags
|
|
||||||
|
|
||||||
|
|
||||||
def create_list_of_strings(whitespace_seperated_list):
|
|
||||||
list_of_strings = whitespace_seperated_list.split(' ')
|
|
||||||
for item in list_of_strings:
|
|
||||||
item = "'{}'".format(item)
|
|
||||||
return list_of_strings
|
|
||||||
|
|
||||||
|
|
||||||
def read_module_build_info(bld):
|
|
||||||
with open(os.path.join(bld.path.abspath(), 'module_build_info')) as file:
|
|
||||||
module_build_info = {}
|
|
||||||
for line in file.readlines():
|
|
||||||
line = line.strip()
|
|
||||||
if line and not line.startswith('#'):
|
|
||||||
key, value = line.split('=', 1)
|
|
||||||
module_build_info[key.strip(' +')] = value.strip()
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['OPTIONAL_HEADERS'] = (
|
|
||||||
create_list_of_strings(module_build_info['OPTIONAL_HEADERS']))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['DEPENDENT_MODULES'] = (
|
|
||||||
create_list_of_strings(module_build_info['DEPENDENT_MODULES']))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['MODULE_XCC_FLAGS'] = (
|
|
||||||
create_list_from_make_flag(bld,
|
|
||||||
create_list_of_strings(module_build_info['MODULE_XCC_FLAGS'])))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['MODULE_XCC_XC_FLAGS'] = (
|
|
||||||
create_list_from_make_flag(bld,
|
|
||||||
create_list_of_strings(module_build_info['MODULE_XCC_XC_FLAGS'])))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['MODULE_XCC_C_FLAGS'] = (
|
|
||||||
create_list_from_make_flag(bld,
|
|
||||||
create_list_of_strings(module_build_info['MODULE_XCC_C_FLAGS'])))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['MODULE_XCC_CPP_FLAGS'] = (
|
|
||||||
create_list_from_make_flag(bld,
|
|
||||||
create_list_of_strings(module_build_info['MODULE_XCC_CPP_FLAGS'])))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['MODULE_XCC_ASM_FLAGS'] = (
|
|
||||||
create_list_from_make_flag(bld,
|
|
||||||
create_list_of_strings(module_build_info['MODULE_XCC_ASM_FLAGS'])))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
module_build_info['INCLUDE_DIRS'] = (
|
|
||||||
create_list_of_strings(module_build_info['INCLUDE_DIRS']))
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return module_build_info
|
|
||||||
|
|
||||||
|
|
||||||
def use_module(bld):
|
|
||||||
module_build_info = read_module_build_info(bld)
|
|
||||||
source = bld.path.ant_glob(['src/**/*.xc', 'src/**/*.c', 'src/**/*.S'],
|
|
||||||
excl=['**/descriptors_2.rst'])
|
|
||||||
bld.env.MODULE_XCC_FLAGS = module_build_info['MODULE_XCC_FLAGS']
|
|
||||||
|
|
||||||
# The following file specific flags are not automatically kept in sync with the module_build_info file
|
|
||||||
# Core
|
|
||||||
bld.env['XCC_FLAGS_endpoint0.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
bld.env['XCC_FLAGS_xua_ep0_uacreqs.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
bld.env['XCC_FLAGS_dbcalc.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
bld.env['XCC_FLAGS_audioports.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
bld.env['XCC_FLAGS_audioports.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
# DFU
|
|
||||||
bld.env['XCC_FLAGS_dfu.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
bld.env['XCC_FLAGS_flash_interface.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
bld.env['XCC_FLAGS_flashlib_user.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
|
|
||||||
|
|
||||||
bld.module(
|
|
||||||
source=source,
|
|
||||||
depends_on=module_build_info['DEPENDENT_MODULES'],
|
|
||||||
includes=module_build_info['INCLUDE_DIRS'],
|
|
||||||
optional_headers=module_build_info['OPTIONAL_HEADERS'],
|
|
||||||
version=module_build_info['VERSION'])
|
|
||||||
Reference in New Issue
Block a user