## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-

def build(bld):
    network = bld.create_ns3_module('network', ['core'])
    network.source = [
        'model/address.cc',
        'model/application.cc',
        'model/buffer.cc',
        'model/byte-tag-list.cc',
        'model/channel.cc',
        'model/channel-list.cc',
        'model/chunk.cc',
        'model/header.cc',
        'model/nix-vector.cc',
        'model/node.cc',
        'model/node-list.cc',
        'model/net-device.cc',
        'model/packet.cc',
        'model/packet-metadata.cc',
        'model/packet-tag-list.cc',
        'model/socket.cc',
        'model/socket-factory.cc',
        'model/tag.cc',
        'model/tag-buffer.cc',
        'model/trailer.cc',
	'utils/address-utils.cc',
        'utils/data-rate.cc',
        'utils/drop-tail-queue.cc',
        'utils/error-model.cc',
        'utils/ethernet-header.cc',
        'utils/ethernet-trailer.cc',
        'utils/flow-id-tag.cc',
        'utils/inet-socket-address.cc',
        'utils/inet6-socket-address.cc',
        'utils/ipv4-address.cc',
        'utils/ipv6-address.cc',
        'utils/mac48-address.cc',
        'utils/mac64-address.cc',
        'utils/llc-snap-header.cc',
        'utils/output-stream-wrapper.cc',
        'utils/packetbb.cc',
        'utils/packet-burst.cc',
        'utils/packet-socket.cc',
        'utils/packet-socket-address.cc',
        'utils/packet-socket-factory.cc',
        'utils/pcap-file.cc',
        'utils/pcap-file-wrapper.cc',
        'utils/queue.cc',
        'utils/radiotap-header.cc',
        'utils/simple-channel.cc',
        'utils/simple-net-device.cc',
        'helper/application-container.cc',
        'helper/net-device-container.cc',
        'helper/node-container.cc',
        'helper/packet-socket-helper.cc',
        'helper/trace-helper.cc',
        ]

    network_test = bld.create_ns3_module_test_library('network')
    network_test.source = [
        'test/buffer-test.cc',
        'test/drop-tail-queue-test-suite.cc',
        'test/packetbb-test-suite.cc',
        'test/packet-test-suite.cc',
        'test/packet-metadata-test.cc',
        'test/pcap-file-test-suite.cc',
        'test/sequence-number-test-suite.cc',
        ]

    headers = bld.new_task_gen('ns3header')
    headers.module = 'network'
    headers.source = [
        'model/address.h',
        'model/application.h',
        'model/buffer.h',
        'model/byte-tag-list.h',
        'model/channel.h',
        'model/channel-list.h',
        'model/chunk.h',
        'model/header.h',
        'model/net-device.h',
        'model/nix-vector.h',
        'model/node.h',
        'model/node-list.h',
        'model/packet.h',
        'model/packet-metadata.h',
        'model/packet-tag-list.h',
        'model/socket.h',
        'model/socket-factory.h',
        'model/tag.h',
        'model/tag-buffer.h',
        'model/trailer.h',
      	'utils/address-utils.h',
        'utils/data-rate.h',
        'utils/drop-tail-queue.h',
        'utils/error-model.h',
        'utils/ethernet-header.h',
        'utils/ethernet-trailer.h',
        'utils/flow-id-tag.h',
        'utils/inet-socket-address.h',
        'utils/inet6-socket-address.h',
        'utils/ipv4-address.h',
        'utils/ipv6-address.h',
        'utils/llc-snap-header.h',
        'utils/mac48-address.h',
        'utils/mac64-address.h',
        'utils/output-stream-wrapper.h',
        'utils/packetbb.h',
        'utils/packet-burst.h',
        'utils/packet-socket.h',
        'utils/packet-socket-address.h',
        'utils/packet-socket-factory.h',
        'utils/pcap-file.h',
        'utils/pcap-file-wrapper.h',
        'utils/generic-phy.h',
        'utils/queue.h',
        'utils/radiotap-header.h',
        'utils/sequence-number.h',
        'utils/sgi-hashmap.h',
        'utils/simple-channel.h',
        'utils/simple-net-device.h',
        'helper/application-container.h',
        'helper/net-device-container.h',
        'helper/node-container.h',
        'helper/packet-socket-helper.h',
        'helper/trace-helper.h',
        ]

    if (bld.env['ENABLE_EXAMPLES']):
        bld.add_subdirs('examples')

    bld.ns3_python_bindings()
