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

def build(bld):

    module = bld.create_ns3_module('spectrum', ['internet', 'propagation', 'applications'])
    module.source = [
        'model/spectrum-model.cc',
        'model/spectrum-value.cc',
        'model/spectrum-converter.cc',
        'model/spectrum-type.cc',
        'model/spectrum-propagation-loss-model.cc',
        'model/friis-spectrum-propagation-loss.cc',
        'model/spectrum-phy.cc',
        'model/spectrum-channel.cc',        
        'model/single-model-spectrum-channel.cc',
        'model/multi-model-spectrum-channel.cc',
        'model/spectrum-interference.cc',
        'model/spectrum-error-model.cc',
        'model/spectrum-model-ism2400MHz-res1MHz.cc',
        'model/spectrum-model-300kHz-300GHz-log.cc', 
        'model/wifi-spectrum-value-helper.cc',
        'model/waveform-generator.cc',
        'model/spectrum-analyzer.cc',
        'model/aloha-noack-mac-header.cc',
        'model/aloha-noack-net-device.cc',
        'model/half-duplex-ideal-phy.cc',
        'model/non-communicating-net-device.cc',
        'model/microwave-oven-spectrum-value-helper.cc',
        'helper/spectrum-helper.cc',
        'helper/adhoc-aloha-noack-ideal-phy-helper.cc',
        'helper/waveform-generator-helper.cc',
        'helper/spectrum-analyzer-helper.cc',
        ]

    module_test = bld.create_ns3_module_test_library('spectrum')
    module_test.source = [
        'test/spectrum-interference-test.cc',
        'test/spectrum-value-test.cc',
        'test/spectrum-ideal-phy-test.cc',
        ]
    
    headers = bld.new_task_gen('ns3header')
    headers.module = 'spectrum'
    headers.source = [
        'model/spectrum-model.h',
        'model/spectrum-value.h',
        'model/spectrum-converter.h',
        'model/spectrum-type.h',
        'model/spectrum-propagation-loss-model.h',
        'model/friis-spectrum-propagation-loss.h',
        'model/spectrum-phy.h',
        'model/spectrum-channel.h',
        'model/single-model-spectrum-channel.h', 
        'model/multi-model-spectrum-channel.h',
        'model/spectrum-interference.h',
        'model/spectrum-error-model.h',
        'model/spectrum-model-ism2400MHz-res1MHz.h',
        'model/spectrum-model-300kHz-300GHz-log.h',
        'model/wifi-spectrum-value-helper.h',
        'model/waveform-generator.h',       
        'model/spectrum-analyzer.h',
        'model/aloha-noack-mac-header.h',
        'model/aloha-noack-net-device.h',
        'model/half-duplex-ideal-phy.h',
        'model/non-communicating-net-device.h',
        'model/microwave-oven-spectrum-value-helper.h',
        'helper/spectrum-helper.h',
        'helper/adhoc-aloha-noack-ideal-phy-helper.h',
        'helper/waveform-generator-helper.h',
        'helper/spectrum-analyzer-helper.h',
        'test/spectrum-test.h',
        ]

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


    bld.ns3_python_bindings()
