Merge pull request #1427 from justbuchanan/add-rpc-build

Added option to build rpc library. closes #1426
pull/1424/head^2
Martin Kojtal 2015-11-20 08:41:01 +00:00
commit 2eb940b9a7
4 changed files with 24 additions and 0 deletions

View File

@ -49,6 +49,12 @@ if __name__ == '__main__':
default=False,
help="Compile the rtos")
parser.add_option("--rpc",
action="store_true",
dest="rpc",
default=False,
help="Compile the rpc library")
parser.add_option("-e", "--eth",
action="store_true", dest="eth",
default=False,
@ -168,6 +174,8 @@ if __name__ == '__main__':
# Additional Libraries
if options.rtos:
libraries.extend(["rtx", "rtos"])
if options.rpc:
libraries.extend(["rpc"])
if options.eth:
libraries.append("eth")
if options.usb:

View File

@ -34,6 +34,14 @@ LIBRARIES = [
"dependencies": [MBED_LIBRARIES, MBED_RTX],
},
# RPC
{
"id": "rpc",
"source_dir": MBED_RPC,
"build_dir": RPC_LIBRARY,
"dependencies": [MBED_LIBRARIES],
},
# USB Device libraries
{
"id": "usb",

View File

@ -30,6 +30,7 @@ sys.path.insert(0, ROOT)
from workspace_tools.utils import args_error
from workspace_tools.paths import BUILD_DIR
from workspace_tools.paths import RTOS_LIBRARIES
from workspace_tools.paths import RPC_LIBRARY
from workspace_tools.paths import ETH_LIBRARY
from workspace_tools.paths import USB_HOST_LIBRARIES, USB_LIBRARIES
from workspace_tools.paths import DSP_LIBRARIES
@ -113,6 +114,10 @@ if __name__ == '__main__':
action="store_true", dest="rtos",
default=False, help="Link with RTOS library")
parser.add_option("--rpc",
action="store_true", dest="rpc",
default=False, help="Link with RPC library")
parser.add_option("--eth",
action="store_true", dest="eth",
default=False,
@ -218,6 +223,7 @@ if __name__ == '__main__':
# Linking with extra libraries
if options.rtos: test.dependencies.append(RTOS_LIBRARIES)
if options.rpc: test.dependencies.append(RPC_LIBRARY)
if options.eth: test.dependencies.append(ETH_LIBRARY)
if options.usb_host: test.dependencies.append(USB_HOST_LIBRARIES)
if options.usb: test.dependencies.append(USB_LIBRARIES)

View File

@ -47,6 +47,8 @@ HOST_TESTS = join(ROOT, "workspace_tools", "host_tests")
# mbed RPC
MBED_RPC = join(LIB_DIR, "rpc")
RPC_LIBRARY = join(BUILD_DIR, "rpc")
# mbed RTOS
RTOS = join(LIB_DIR, "rtos")
MBED_RTX = join(RTOS, "rtx")