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

def build(bld):
    obj = bld.create_ns3_module('wifi', ['network', 'propagation', 'energy', 'spectrum', 'antenna', 'mobility'])
    obj.source = [
        'model/wifi-utils.cc',
        'model/wifi-information-element.cc',
        'model/wifi-information-element-vector.cc',
        'model/wifi-mode.cc',
        'model/ssid.cc',
        'model/wifi-phy.cc',
        'model/wifi-phy-operating-channel.cc',
        'model/wifi-phy-state-helper.cc',
        'model/error-rate-model.cc',
        'model/yans-error-rate-model.cc',
        'model/nist-error-rate-model.cc',
        'model/non-ht/dsss-error-rate-model.cc',
        'model/table-based-error-rate-model.cc',
        'model/interference-helper.cc',
        'model/wifi-phy-common.cc',
        'model/yans-wifi-phy.cc',
        'model/yans-wifi-channel.cc',
        'model/spectrum-wifi-phy.cc',
        'model/wifi-spectrum-phy-interface.cc',
        'model/wifi-spectrum-signal-parameters.cc',
        'model/wifi-mac-header.cc',
        'model/wifi-mac-trailer.cc',
        'model/wifi-tx-timer.cc',
        'model/wifi-protection.cc',
        'model/wifi-acknowledgment.cc',
        'model/wifi-tx-parameters.cc',
        'model/wifi-protection-manager.cc',
        'model/wifi-default-protection-manager.cc',
        'model/wifi-ack-manager.cc',
        'model/wifi-default-ack-manager.cc',
        'model/frame-exchange-manager.cc',
        'model/qos-frame-exchange-manager.cc',
        'model/ht/ht-frame-exchange-manager.cc',
        'model/vht/vht-frame-exchange-manager.cc',
        'model/he/he-frame-exchange-manager.cc',
        'model/he/multi-user-scheduler.cc',
        'model/he/rr-multi-user-scheduler.cc',
        'model/wifi-mac-queue.cc',
        'model/mac-tx-middle.cc',
        'model/mac-rx-middle.cc',
        'model/txop.cc',
        'model/supported-rates.cc',
        'model/capability-information.cc',
        'model/status-code.cc',
        'model/mgt-headers.cc',
        'model/channel-access-manager.cc',
        'model/wifi-mac.cc',
        'model/regular-wifi-mac.cc',
        'model/wifi-remote-station-info.cc',
        'model/wifi-remote-station-manager.cc',
        'model/ap-wifi-mac.cc',
        'model/sta-wifi-mac.cc',
        'model/adhoc-wifi-mac.cc',
        'model/wifi-net-device.cc',
        'model/rate-control/arf-wifi-manager.cc',
        'model/rate-control/aarf-wifi-manager.cc',
        'model/rate-control/ideal-wifi-manager.cc',
        'model/rate-control/constant-rate-wifi-manager.cc',
        'model/rate-control/amrr-wifi-manager.cc',
        'model/rate-control/onoe-wifi-manager.cc',
        'model/rate-control/rraa-wifi-manager.cc',
        'model/rate-control/aarfcd-wifi-manager.cc',
        'model/rate-control/cara-wifi-manager.cc',
        'model/rate-control/minstrel-wifi-manager.cc',
        'model/rate-control/minstrel-ht-wifi-manager.cc',
        'model/qos-utils.cc',
        'model/qos-txop.cc',
        'model/msdu-aggregator.cc',
        'model/amsdu-subframe-header.cc',
        'model/originator-block-ack-agreement.cc',
        'model/recipient-block-ack-agreement.cc',
        'model/ctrl-headers.cc',
        'model/qos-blocked-destinations.cc',
        'model/block-ack-agreement.cc',
        'model/block-ack-manager.cc',
        'model/block-ack-window.cc',
        'model/block-ack-type.cc',
        'model/snr-tag.cc',
        'model/he/mu-snr-tag.cc',
        'model/ht/ht-capabilities.cc',
        'model/wifi-tx-vector.cc',
        'model/rate-control/parf-wifi-manager.cc',
        'model/rate-control/aparf-wifi-manager.cc',
        'model/rate-control/rrpaa-wifi-manager.cc',
        'model/rate-control/thompson-sampling-wifi-manager.cc',
        'model/ampdu-subframe-header.cc',
        'model/mpdu-aggregator.cc',
        'model/ampdu-tag.cc',
        'model/wifi-radio-energy-model.cc',
        'model/wifi-tx-current-model.cc',
        'model/vht/vht-capabilities.cc',
        'model/non-ht/erp-information.cc',
        'model/ht/ht-operation.cc',
        'model/vht/vht-operation.cc',
        'model/non-ht/dsss-parameter-set.cc',
        'model/edca-parameter-set.cc',
        'model/he/mu-edca-parameter-set.cc',
        'model/he/he-capabilities.cc',
        'model/frame-capture-model.cc',
        'model/simple-frame-capture-model.cc',
        'model/preamble-detection-model.cc',
        'model/threshold-preamble-detection-model.cc',
        'model/he/he-operation.cc',
        'model/he/he-configuration.cc',
        'model/extended-capabilities.cc',
        'model/wifi-mac-queue-item.cc',
        'model/wifi-psdu.cc',
        'model/wifi-ppdu.cc',
        'model/non-ht/dsss-ppdu.cc',
        'model/non-ht/ofdm-ppdu.cc',
        'model/non-ht/erp-ofdm-ppdu.cc',
        'model/ht/ht-ppdu.cc',
        'model/vht/vht-ppdu.cc',
        'model/he/he-ppdu.cc',
        'model/ht/ht-configuration.cc',
        'model/vht/vht-configuration.cc',
        'model/he/obss-pd-algorithm.cc',
        'model/he/constant-obss-pd-algorithm.cc',
        'model/he/he-ru.cc',
        'model/phy-entity.cc',
        'model/non-ht/dsss-phy.cc',
        'model/non-ht/ofdm-phy.cc',
        'model/non-ht/erp-ofdm-phy.cc',
        'model/ht/ht-phy.cc',
        'model/vht/vht-phy.cc',
        'model/he/he-phy.cc',
        'helper/wifi-radio-energy-model-helper.cc',
        'helper/athstats-helper.cc',
        'helper/wifi-helper.cc',
        'helper/yans-wifi-helper.cc',
        'helper/spectrum-wifi-helper.cc',
        'helper/wifi-mac-helper.cc',
        ]

    obj_test = bld.create_ns3_module_test_library('wifi')
    obj_test.source = [
        'test/block-ack-test-suite.cc',
        'test/channel-access-manager-test.cc',
        'test/tx-duration-test.cc',
        'test/power-rate-adaptation-test.cc',
        'test/wifi-test.cc',
        'test/wifi-txop-test.cc',
        'test/spectrum-wifi-phy-test.cc',
        'test/wifi-primary-channels-test.cc',
        'test/wifi-aggregation-test.cc',
        'test/wifi-error-rate-models-test.cc',
        'test/wifi-transmit-mask-test.cc',
        'test/wifi-phy-thresholds-test.cc',
        'test/wifi-phy-reception-test.cc',
        'test/inter-bss-test-suite.cc',
        'test/wifi-mac-ofdma-test.cc',
        'test/wifi-phy-ofdma-test.cc',
        'test/wifi-mac-queue-test.cc',
        ]

    # Tests encapsulating example programs should be listed here
    if (bld.env['ENABLE_EXAMPLES']):
        obj_test.source.extend([
        #   'test/wifi-examples-test-suite.cc',
            ])
    
    headers = bld(features='ns3header')
    headers.module = 'wifi'
    headers.source = [
        'model/wifi-utils.h',
        'model/wifi-information-element.h',
        'model/wifi-information-element-vector.h',
        'model/wifi-net-device.h',
        'model/wifi-mode.h',
        'model/ssid.h',
        'model/wifi-phy-common.h',
        'model/wifi-phy-band.h',
        'model/wifi-standards.h',
        'model/yans-wifi-phy.h',
        'model/spectrum-wifi-phy.h',
        'model/yans-wifi-channel.h',
        'model/wifi-phy.h',
        'model/wifi-phy-operating-channel.h',
        'model/wifi-spectrum-phy-interface.h',
        'model/wifi-spectrum-signal-parameters.h',
        'model/interference-helper.h',
        'model/wifi-remote-station-info.h',
        'model/wifi-remote-station-manager.h',
        'model/ap-wifi-mac.h',
        'model/sta-wifi-mac.h',
        'model/adhoc-wifi-mac.h',
        'model/rate-control/arf-wifi-manager.h',
        'model/rate-control/aarf-wifi-manager.h',
        'model/rate-control/ideal-wifi-manager.h',
        'model/rate-control/constant-rate-wifi-manager.h',
        'model/rate-control/amrr-wifi-manager.h',
        'model/rate-control/onoe-wifi-manager.h',
        'model/rate-control/rraa-wifi-manager.h',
        'model/rate-control/aarfcd-wifi-manager.h',
        'model/rate-control/cara-wifi-manager.h',
        'model/rate-control/minstrel-wifi-manager.h',
        'model/rate-control/minstrel-ht-wifi-manager.h',
        'model/rate-control/thompson-sampling-wifi-manager.h',
        'model/wifi-mac.h',
        'model/regular-wifi-mac.h',
        'model/supported-rates.h',
        'model/error-rate-model.h',
        'model/yans-error-rate-model.h',
        'model/nist-error-rate-model.h',
        'model/non-ht/dsss-error-rate-model.h',
        'model/table-based-error-rate-model.h',
        'model/wifi-mac-queue.h',
        'model/txop.h',
        'model/wifi-mac-header.h',
        'model/wifi-mac-trailer.h',
        'model/wifi-phy-state-helper.h',
        'model/qos-utils.h',
        'model/qos-txop.h',
        'model/msdu-aggregator.h',
        'model/amsdu-subframe-header.h',
        'model/mgt-headers.h',
        'model/status-code.h',
        'model/capability-information.h',
        'model/channel-access-manager.h',
        'model/mac-tx-middle.h', 
        'model/mac-rx-middle.h', 
        'model/wifi-tx-timer.h',
        'model/wifi-protection.h',
        'model/wifi-acknowledgment.h',
        'model/wifi-tx-parameters.h',
        'model/wifi-protection-manager.h',
        'model/wifi-default-protection-manager.h',
        'model/wifi-ack-manager.h',
        'model/wifi-default-ack-manager.h',
        'model/frame-exchange-manager.h',
        'model/qos-frame-exchange-manager.h',
        'model/ht/ht-frame-exchange-manager.h',
        'model/vht/vht-frame-exchange-manager.h',
        'model/he/he-frame-exchange-manager.h',
        'model/he/multi-user-scheduler.h',
        'model/he/rr-multi-user-scheduler.h',
        'model/originator-block-ack-agreement.h',
        'model/recipient-block-ack-agreement.h',
        'model/ctrl-headers.h',
        'model/block-ack-agreement.h',
        'model/block-ack-manager.h',
        'model/block-ack-window.h',
        'model/snr-tag.h',
        'model/he/mu-snr-tag.h',
        'model/ht/ht-capabilities.h',
        'model/rate-control/parf-wifi-manager.h',
        'model/rate-control/aparf-wifi-manager.h',
        'model/rate-control/rrpaa-wifi-manager.h',
        'model/wifi-tx-vector.h',
        'model/ampdu-subframe-header.h',
        'model/mpdu-aggregator.h',
        'model/ampdu-tag.h',
        'model/wifi-radio-energy-model.h',
        'model/wifi-tx-current-model.h',
        'model/vht/vht-capabilities.h',
        'model/non-ht/erp-information.h',
        'model/ht/ht-operation.h',
        'model/vht/vht-operation.h',
        'model/non-ht/dsss-parameter-set.h',
        'model/edca-parameter-set.h',
        'model/he/mu-edca-parameter-set.h',
        'model/he/he-capabilities.h',
        'model/frame-capture-model.h',
        'model/simple-frame-capture-model.h',
        'model/preamble-detection-model.h',
        'model/threshold-preamble-detection-model.h',
        'model/qos-blocked-destinations.h',
        'model/he/he-operation.h',
        'model/he/he-configuration.h',
        'model/extended-capabilities.h',
        'model/wifi-mac-queue-item.h',
        'model/wifi-psdu.h',
        'model/wifi-ppdu.h',
        'model/non-ht/dsss-ppdu.h',
        'model/non-ht/erp-ofdm-ppdu.h',
        'model/non-ht/ofdm-ppdu.h',
        'model/ht/ht-ppdu.h',
        'model/vht/vht-ppdu.h',
        'model/he/he-ppdu.h',
        'model/wifi-phy-state.h',
        'model/wifi-phy-listener.h',
        'model/block-ack-type.h',
        'model/wifi-mpdu-type.h',
        'model/ht/ht-configuration.h',
        'model/vht/vht-configuration.h',
        'model/he/obss-pd-algorithm.h',
        'model/he/constant-obss-pd-algorithm.h',
        'model/he/he-ru.h',
        'model/reference/error-rate-tables.h',
        'model/phy-entity.h',
        'model/non-ht/dsss-phy.h',
        'model/non-ht/ofdm-phy.h',
        'model/non-ht/erp-ofdm-phy.h',
        'model/ht/ht-phy.h',
        'model/vht/vht-phy.h',
        'model/he/he-phy.h',
        'helper/wifi-radio-energy-model-helper.h',
        'helper/athstats-helper.h',
        'helper/wifi-helper.h',
        'helper/yans-wifi-helper.h',
        'helper/spectrum-wifi-helper.h',
        'helper/wifi-mac-helper.h',
        ]

    if bld.env['ENABLE_GSL']:
        obj.use.extend(['GSL', 'GSLCBLAS', 'M'])
        obj_test.use.extend(['GSL', 'GSLCBLAS', 'M'])

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

    bld.ns3_python_bindings()

