OpenCores
URL https://opencores.org/ocsvn/funbase_ip_library/funbase_ip_library/trunk

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.swp.api/] [openmcapi/] [1.0/] [libmcapi/] [wscript] - Rev 145

Compare with Previous | Blame | View Log

#!/usr/bin/env python

subdirs = ['shm']

def options(opt):
        opt.add_option('--max-data-len', default='1024', type='int', help='The maximum size, in bytes, of data that can be sent through an endpoint. The transport-level buffer may be slightly larger, to accommodate transport-specific metadata.')
        opt.add_option('--max-endpoints', default='32', type='int', help='The maximum number of endpoints that may be simultaneously open in one node.')

        opt.recurse(subdirs)

def configure(conf):
        conf.define('MCAPI_MAX_DATA_LEN', conf.options.max_data_len)
        conf.define('MCAPI_MAX_ENDPOINTS', conf.options.max_endpoints)

        conf.recurse(subdirs)

def build(bld):
        includes = [
                '../include',
                '../include/%s' % bld.env.OS,
                'include',
        ]

        sources = [
                'mcapi_cfg.c',
                'mcapi/cntrl_msg.c',
                'mcapi/connect.c',
                'mcapi/create_endpoint.c',
                'mcapi/data_avail.c',
                'mcapi/data_count.c',
                'mcapi/endpoint.c',
                'mcapi/forward.c',
                'mcapi/get_endp.c',
                'mcapi/handle.c',
                'mcapi/interface.c',
                'mcapi/mcapi_cancel.c',
                'mcapi/mcapi_connect_pktchan_i.c',
                'mcapi/mcapi_connect_sclchan_i.c',
                'mcapi/mcapi_create_endp.c',
                'mcapi/mcapi_delete_endp.c',
                'mcapi/mcapi_finalize.c',
                'mcapi/mcapi_get_endp_attrib.c',
                'mcapi/mcapi_get_endp_i.c',
                'mcapi/mcapi_get_endp.c',
                'mcapi/mcapi_get_node_id.c',
                'mcapi/mcapi_init.c',
                'mcapi/mcapi_msg_avail.c',
                'mcapi/mcapi_msg_rcv_i.c',
                'mcapi/mcapi_msg_rcv.c',
                'mcapi/mcapi_msg_snd_i.c',
                'mcapi/mcapi_msg_snd.c',
                'mcapi/mcapi_open_pktchan_rcv_i.c',
                'mcapi/mcapi_open_pktchan_snd_i.c',
                'mcapi/mcapi_open_sclchan_rcv_i.c',
                'mcapi/mcapi_open_sclchan_snd_i.c',
                'mcapi/mcapi_pktchan_avail.c',
                'mcapi/mcapi_pktchan_free.c',
                'mcapi/mcapi_pktchan_rcv_close_i.c',
                'mcapi/mcapi_pktchan_rcv_i.c',
                'mcapi/mcapi_pktchan_rcv.c',
                'mcapi/mcapi_pktchan_snd_close_i.c',
                'mcapi/mcapi_pktchan_snd_i.c',
                'mcapi/mcapi_pktchan_snd.c',
                'mcapi/mcapi_sclchan_avail.c',
                'mcapi/mcapi_sclchan_rcv_close_i.c',
                'mcapi/mcapi_sclchan_rcv_u16.c',
                'mcapi/mcapi_sclchan_rcv_u32.c',
                'mcapi/mcapi_sclchan_rcv_u64.c',
                'mcapi/mcapi_sclchan_rcv_u8.c',
                'mcapi/mcapi_sclchan_snd_close_i.c',
                'mcapi/mcapi_sclchan_snd_u16.c',
                'mcapi/mcapi_sclchan_snd_u32.c',
                'mcapi/mcapi_sclchan_snd_u64.c',
                'mcapi/mcapi_sclchan_snd_u8.c',
                'mcapi/mcapi_set_endp_attrib.c',
                'mcapi/mcapi_test.c',
                'mcapi/mcapi_wait_any.c',
                'mcapi/mcapi_wait.c',
                'mcapi/msg_rcv.c',
                'mcapi/msg_snd.c',
                'mcapi/node_data.c',
                'mcapi/node.c',
                'mcapi/pkt_rcv.c',
                'mcapi/pkt_snd.c',
                'mcapi/queue.c',
                'mcapi/request.c',
                'mcapi/route.c',
                'mcapi/scal_rcv.c',
                'mcapi/scal_snd.c',
                'mcapi/suspend.c',
                'mcapi/mcapi_tls.c',
        ]

        extra_sources = {
                'linux': ['mcapi/linux/mcapi_os.c'],
        }

        sources += extra_sources.get(bld.env.OS, [])

        bld.env.prepend_value('CFLAGS', ['-O2', '-Wall'])

        bld.stlib(
                target='mcapi',
                source=' '.join(sources),
                includes=' '.join(includes),
                use='shm_objs',
        )

        bld.recurse(subdirs)

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.