set(gsl_libraries)
if(${GSL_FOUND})
  set(gsl_libraries
      ${GSL_LIBRARIES}
  )
endif()

set(source_files
    helper/athstats-helper.cc
    helper/spectrum-wifi-helper.cc
    helper/wifi-co-trace-helper.cc
    helper/wifi-helper.cc
    helper/wifi-mac-helper.cc
    helper/wifi-radio-energy-model-helper.cc
    helper/yans-wifi-helper.cc
    helper/wifi-phy-rx-trace-helper.cc
    helper/wifi-tx-stats-helper.cc
    model/addba-extension.cc
    model/adhoc-wifi-mac.cc
    model/ampdu-subframe-header.cc
    model/ampdu-tag.cc
    model/amsdu-subframe-header.cc
    model/ap-wifi-mac.cc
    model/block-ack-agreement.cc
    model/block-ack-manager.cc
    model/block-ack-type.cc
    model/block-ack-window.cc
    model/capability-information.cc
    model/channel-access-manager.cc
    model/ctrl-headers.cc
    model/edca-parameter-set.cc
    model/eht/advanced-ap-emlsr-manager.cc
    model/eht/advanced-emlsr-manager.cc
    model/eht/ap-emlsr-manager.cc
    model/eht/advanced-ap-emlsr-manager.cc
    model/eht/common-info-basic-mle.cc
    model/eht/common-info-probe-req-mle.cc
    model/eht/default-ap-emlsr-manager.cc
    model/eht/default-emlsr-manager.cc
    model/eht/eht-capabilities.cc
    model/eht/eht-configuration.cc
    model/eht/eht-frame-exchange-manager.cc
    model/eht/eht-operation.cc
    model/eht/tid-to-link-mapping-element.cc
    model/eht/eht-phy.cc
    model/eht/eht-ppdu.cc
    model/eht/eht-ru.cc
    model/eht/emlsr-manager.cc
    model/eht/multi-link-element.cc
    model/error-rate-model.cc
    model/extended-capabilities.cc
    model/fcfs-wifi-queue-scheduler.cc
    model/frame-capture-model.cc
    model/frame-exchange-manager.cc
    model/gcr-group-address.cc
    model/gcr-manager.cc
    model/he/constant-obss-pd-algorithm.cc
    model/he/he-6ghz-band-capabilities.cc
    model/he/he-capabilities.cc
    model/he/he-configuration.cc
    model/he/he-frame-exchange-manager.cc
    model/he/he-operation.cc
    model/he/he-phy.cc
    model/he/he-ppdu.cc
    model/he/he-ru.cc
    model/he/mu-edca-parameter-set.cc
    model/he/mu-snr-tag.cc
    model/he/multi-user-scheduler.cc
    model/he/obss-pd-algorithm.cc
    model/he/rr-multi-user-scheduler.cc
    model/ht/ht-capabilities.cc
    model/ht/ht-configuration.cc
    model/ht/ht-frame-exchange-manager.cc
    model/ht/ht-operation.cc
    model/ht/ht-phy.cc
    model/ht/ht-ppdu.cc
    model/interference-helper.cc
    model/mac-rx-middle.cc
    model/mac-tx-middle.cc
    model/mgt-action-headers.cc
    model/mgt-headers.cc
    model/mpdu-aggregator.cc
    model/msdu-aggregator.cc
    model/nist-error-rate-model.cc
    model/non-ht/dsss-error-rate-model.cc
    model/non-ht/dsss-parameter-set.cc
    model/non-ht/dsss-phy.cc
    model/non-ht/dsss-ppdu.cc
    model/non-ht/erp-information.cc
    model/non-ht/erp-ofdm-phy.cc
    model/non-ht/erp-ofdm-ppdu.cc
    model/non-ht/ofdm-phy.cc
    model/non-ht/ofdm-ppdu.cc
    model/non-inheritance.cc
    model/originator-block-ack-agreement.cc
    model/phy-entity.cc
    model/preamble-detection-model.cc
    model/qos-frame-exchange-manager.cc
    model/qos-txop.cc
    model/qos-utils.cc
    model/rate-control/aarf-wifi-manager.cc
    model/rate-control/aarfcd-wifi-manager.cc
    model/rate-control/amrr-wifi-manager.cc
    model/rate-control/aparf-wifi-manager.cc
    model/rate-control/arf-wifi-manager.cc
    model/rate-control/cara-wifi-manager.cc
    model/rate-control/constant-rate-wifi-manager.cc
    model/rate-control/ideal-wifi-manager.cc
    model/rate-control/minstrel-ht-wifi-manager.cc
    model/rate-control/minstrel-wifi-manager.cc
    model/rate-control/onoe-wifi-manager.cc
    model/rate-control/parf-wifi-manager.cc
    model/rate-control/rraa-wifi-manager.cc
    model/rate-control/rrpaa-wifi-manager.cc
    model/rate-control/thompson-sampling-wifi-manager.cc
    model/recipient-block-ack-agreement.cc
    model/reduced-neighbor-report.cc
    model/reference/error-rate-tables.cc
    model/simple-frame-capture-model.cc
    model/snr-tag.cc
    model/spectrum-wifi-phy.cc
    model/ssid.cc
    model/sta-wifi-mac.cc
    model/status-code.cc
    model/supported-rates.cc
    model/table-based-error-rate-model.cc
    model/threshold-preamble-detection-model.cc
    model/tim.cc
    model/txop.cc
    model/vht/vht-capabilities.cc
    model/vht/vht-configuration.cc
    model/vht/vht-frame-exchange-manager.cc
    model/vht/vht-operation.cc
    model/vht/vht-phy.cc
    model/vht/vht-ppdu.cc
    model/wifi-ack-manager.cc
    model/wifi-acknowledgment.cc
    model/wifi-assoc-manager.cc
    model/wifi-bandwidth-filter.cc
    model/wifi-constants.cc
    model/wifi-default-ack-manager.cc
    model/wifi-default-assoc-manager.cc
    model/wifi-default-gcr-manager.cc
    model/wifi-default-protection-manager.cc
    model/wifi-information-element.cc
    model/wifi-mac-header.cc
    model/wifi-mac-queue-container.cc
    model/wifi-mac-queue-elem.cc
    model/wifi-mac-queue-scheduler.cc
    model/wifi-mac-queue.cc
    model/wifi-mac-trailer.cc
    model/wifi-mac.cc
    model/wifi-mode.cc
    model/wifi-mpdu.cc
    model/wifi-net-device.cc
    model/wifi-phy.cc
    model/wifi-phy-common.cc
    model/wifi-phy-operating-channel.cc
    model/wifi-phy-state-helper.cc
    model/wifi-ppdu.cc
    model/wifi-protection-manager.cc
    model/wifi-protection.cc
    model/wifi-psdu.cc
    model/wifi-radio-energy-model.cc
    model/wifi-remote-station-info.cc
    model/wifi-remote-station-manager.cc
    model/wifi-ru.cc
    model/wifi-spectrum-phy-interface.cc
    model/wifi-spectrum-signal-parameters.cc
    model/wifi-standards.cc
    model/wifi-tx-current-model.cc
    model/wifi-tx-parameters.cc
    model/wifi-tx-timer.cc
    model/wifi-tx-vector.cc
    model/wifi-utils.cc
    model/yans-error-rate-model.cc
    model/yans-wifi-channel.cc
    model/yans-wifi-phy.cc
    model/wifi-spectrum-value-helper.cc
)

set(header_files
    helper/athstats-helper.h
    helper/spectrum-wifi-helper.h
    helper/wifi-co-trace-helper.h
    helper/wifi-helper.h
    helper/wifi-mac-helper.h
    helper/wifi-radio-energy-model-helper.h
    helper/yans-wifi-helper.h
    helper/wifi-phy-rx-trace-helper.h
    helper/wifi-tx-stats-helper.h
    model/addba-extension.h
    model/adhoc-wifi-mac.h
    model/ampdu-subframe-header.h
    model/ampdu-tag.h
    model/amsdu-subframe-header.h
    model/ap-wifi-mac.h
    model/block-ack-agreement.h
    model/block-ack-manager.h
    model/block-ack-type.h
    model/block-ack-window.h
    model/capability-information.h
    model/channel-access-manager.h
    model/ctrl-headers.h
    model/edca-parameter-set.h
    model/eht/advanced-ap-emlsr-manager.h
    model/eht/advanced-emlsr-manager.h
    model/eht/ap-emlsr-manager.h
    model/eht/common-info-basic-mle.h
    model/eht/common-info-probe-req-mle.h
    model/eht/default-ap-emlsr-manager.h
    model/eht/default-emlsr-manager.h
    model/eht/eht-capabilities.h
    model/eht/eht-configuration.h
    model/eht/eht-frame-exchange-manager.h
    model/eht/eht-operation.h
    model/eht/tid-to-link-mapping-element.h
    model/eht/eht-phy.h
    model/eht/eht-ppdu.h
    model/eht/eht-ru.h
    model/eht/emlsr-manager.h
    model/eht/multi-link-element.h
    model/error-rate-model.h
    model/extended-capabilities.h
    model/fcfs-wifi-queue-scheduler.h
    model/frame-capture-model.h
    model/frame-exchange-manager.h
    model/gcr-group-address.h
    model/gcr-manager.h
    model/he/constant-obss-pd-algorithm.h
    model/he/he-6ghz-band-capabilities.h
    model/he/he-capabilities.h
    model/he/he-configuration.h
    model/he/he-frame-exchange-manager.h
    model/he/he-operation.h
    model/he/he-phy.h
    model/he/he-ppdu.h
    model/he/he-ru.h
    model/he/mu-edca-parameter-set.h
    model/he/mu-snr-tag.h
    model/he/multi-user-scheduler.h
    model/he/obss-pd-algorithm.h
    model/he/rr-multi-user-scheduler.h
    model/ht/ht-capabilities.h
    model/ht/ht-configuration.h
    model/ht/ht-frame-exchange-manager.h
    model/ht/ht-operation.h
    model/ht/ht-phy.h
    model/ht/ht-ppdu.h
    model/interference-helper.h
    model/mac-rx-middle.h
    model/mac-tx-middle.h
    model/mgt-action-headers.h
    model/mgt-headers.h
    model/mpdu-aggregator.h
    model/msdu-aggregator.h
    model/nist-error-rate-model.h
    model/non-ht/dsss-error-rate-model.h
    model/non-ht/dsss-parameter-set.h
    model/non-ht/dsss-phy.h
    model/non-ht/dsss-ppdu.h
    model/non-ht/erp-information.h
    model/non-ht/erp-ofdm-phy.h
    model/non-ht/erp-ofdm-ppdu.h
    model/non-ht/ofdm-phy.h
    model/non-ht/ofdm-ppdu.h
    model/non-inheritance.h
    model/originator-block-ack-agreement.h
    model/phy-entity.h
    model/preamble-detection-model.h
    model/qos-frame-exchange-manager.h
    model/qos-txop.h
    model/qos-utils.h
    model/rate-control/aarf-wifi-manager.h
    model/rate-control/aarfcd-wifi-manager.h
    model/rate-control/amrr-wifi-manager.h
    model/rate-control/aparf-wifi-manager.h
    model/rate-control/arf-wifi-manager.h
    model/rate-control/cara-wifi-manager.h
    model/rate-control/constant-rate-wifi-manager.h
    model/rate-control/ideal-wifi-manager.h
    model/rate-control/minstrel-ht-wifi-manager.h
    model/rate-control/minstrel-wifi-manager.h
    model/rate-control/onoe-wifi-manager.h
    model/rate-control/parf-wifi-manager.h
    model/rate-control/rraa-wifi-manager.h
    model/rate-control/rrpaa-wifi-manager.h
    model/rate-control/thompson-sampling-wifi-manager.h
    model/recipient-block-ack-agreement.h
    model/reduced-neighbor-report.h
    model/reference/error-rate-tables.h
    model/simple-frame-capture-model.h
    model/snr-tag.h
    model/spectrum-wifi-phy.h
    model/ssid.h
    model/sta-wifi-mac.h
    model/status-code.h
    model/supported-rates.h
    model/table-based-error-rate-model.h
    model/threshold-preamble-detection-model.h
    model/tim.h
    model/txop.h
    model/vht/vht-capabilities.h
    model/vht/vht-configuration.h
    model/vht/vht-frame-exchange-manager.h
    model/vht/vht-operation.h
    model/vht/vht-phy.h
    model/vht/vht-ppdu.h
    model/wifi-ack-manager.h
    model/wifi-acknowledgment.h
    model/wifi-assoc-manager.h
    model/wifi-bandwidth-filter.h
    model/wifi-constants.h
    model/wifi-default-ack-manager.h
    model/wifi-default-assoc-manager.h
    model/wifi-default-gcr-manager.h
    model/wifi-default-protection-manager.h
    model/wifi-information-element.h
    model/wifi-mac-header.h
    model/wifi-mac-queue-container.h
    model/wifi-mac-queue-elem.h
    model/wifi-mac-queue-scheduler-impl.h
    model/wifi-mac-queue-scheduler.h
    model/wifi-mac-queue.h
    model/wifi-mac-trailer.h
    model/wifi-mac.h
    model/wifi-mgt-header.h
    model/wifi-mode.h
    model/wifi-mpdu.h
    model/wifi-net-device.h
    model/wifi-opt-field.h
    model/wifi-phy-band.h
    model/wifi-phy-common.h
    model/wifi-phy-listener.h
    model/wifi-phy-operating-channel.h
    model/wifi-phy-state-helper.h
    model/wifi-phy-state.h
    model/wifi-phy.h
    model/wifi-ppdu.h
    model/wifi-protection-manager.h
    model/wifi-protection.h
    model/wifi-psdu.h
    model/wifi-radio-energy-model.h
    model/wifi-remote-station-info.h
    model/wifi-remote-station-manager.h
    model/wifi-ru.h
    model/wifi-spectrum-phy-interface.h
    model/wifi-spectrum-signal-parameters.h
    model/wifi-standards.h
    model/wifi-tx-current-model.h
    model/wifi-tx-parameters.h
    model/wifi-tx-timer.h
    model/wifi-tx-vector.h
    model/wifi-types.h
    model/wifi-units.h
    model/wifi-utils.h
    model/yans-error-rate-model.h
    model/yans-wifi-channel.h
    model/yans-wifi-phy.h
    model/wifi-spectrum-value-helper.h
    test/wifi-mlo-test.h
)

build_lib(
  LIBNAME wifi
  SOURCE_FILES ${source_files}
  HEADER_FILES ${header_files}
  LIBRARIES_TO_LINK
    ${libenergy}
    ${libspectrum}
    ${gsl_libraries}
  TEST_SOURCES
    test/block-ack-test-suite.cc
    test/channel-access-manager-test.cc
    test/inter-bss-test-suite.cc
    test/power-rate-adaptation-test.cc
    test/power-save-test.cc
    test/spectrum-wifi-phy-test.cc
    test/tx-duration-test.cc
    test/wifi-aggregation-test.cc
    test/wifi-channel-settings-test.cc
    test/wifi-co-trace-helper-test.cc
    test/wifi-dynamic-bw-op-test.cc
    test/wifi-eht-info-elems-test.cc
    test/wifi-emlsr-basic-exchanges-test.cc
    test/wifi-emlsr-enabling-test.cc
    test/wifi-emlsr-link-switch-test.cc
    test/wifi-emlsr-test-base.cc
    test/wifi-error-rate-models-test.cc
    test/wifi-fils-frame-test.cc
    test/wifi-gcr-test.cc
    test/wifi-he-info-elems-test.cc
    test/wifi-ie-fragment-test.cc
    test/wifi-mac-ofdma-test.cc
    test/wifi-mac-queue-test.cc
    test/wifi-mlo-test.cc
    test/wifi-phy-ofdma-test.cc
    test/wifi-phy-reception-test.cc
    test/wifi-phy-rx-trace-helper-test.cc
    test/wifi-phy-thresholds-test.cc
    test/wifi-primary-channels-test.cc
    test/wifi-probe-exchange-test.cc
    test/wifi-retransmit-test.cc
    test/wifi-ru-allocation-test.cc
    test/wifi-channel-switching-test.cc
    test/wifi-test.cc
    test/wifi-transmit-mask-test.cc
    test/wifi-txop-test.cc
    test/wifi-phy-cca-test.cc
    test/wifi-non-ht-dup-test.cc
    test/wifi-phy-mu-mimo-test.cc
    test/wifi-operating-channel-test.cc
    test/wifi-tx-stats-helper-test.cc
)
