# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
#
# Doxygen configuration for the WII5 Buoy firmware.
#
# This is a minimal Doxyfile listing only the non-default options. Run
# `doxygen Doxyfile` from the repo root; output lands in doc/api/ (which
# is gitignored). Doxygen >= 1.9 is recommended.

# --- Project identity --------------------------------------------------------
PROJECT_NAME           = "WII5 Buoy Firmware"
PROJECT_BRIEF          = "Firmware for the WII5 wave-measurement buoy (ATmega2560)."
# PROJECT_NUMBER is normally injected by the build script:
#   doxygen <(sed "s/^PROJECT_NUMBER.*/PROJECT_NUMBER = $(cat VERSION | grep version | cut -d= -f2)/" Doxyfile)
# Hardcoded fallback follows.
PROJECT_NUMBER         = v5.5.x

# --- Inputs ------------------------------------------------------------------
INPUT                  = . app/wii5_buoy
RECURSIVE              = YES
FILE_PATTERNS          = *.h *.cpp *.ino
EXCLUDE                = doc test tools .git build .github
EXCLUDE_PATTERNS       = */legacy/* */experimental/*

# --- Output ------------------------------------------------------------------
OUTPUT_DIRECTORY       = doc/api
GENERATE_HTML          = YES
GENERATE_LATEX         = NO
GENERATE_XML           = YES
HTML_OUTPUT            = .

# --- Source extraction -------------------------------------------------------
EXTRACT_ALL            = YES
EXTRACT_PRIVATE        = NO
EXTRACT_STATIC         = YES
EXTRACT_LOCAL_CLASSES  = YES
EXTRACT_ANON_NSPACES   = NO

# Recognise Javadoc-style /** ... */ as the brief if it's a single line.
JAVADOC_AUTOBRIEF      = YES
QT_AUTOBRIEF           = NO

# Source browser is useful for an exploratory codebase.
SOURCE_BROWSER         = YES
INLINE_SOURCES         = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION    = YES

# Sort members the way they appear in the source.
SORT_MEMBER_DOCS       = NO
SORT_BRIEF_DOCS        = NO

# --- Warnings ----------------------------------------------------------------
QUIET                  = YES
WARN_IF_UNDOCUMENTED   = NO     # Tier-1 docs only; flip to YES once Tier-2 lands
WARN_IF_DOC_ERROR      = YES
WARN_AS_ERROR          = NO

# --- Preprocessor (so #ifdef'd code shows up correctly) ----------------------
ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = __WII5_V02__ \
                         WII5_COMMS_IRIDIUM \
                         WII5_GPS \
                         WII5_IMU_SPARTON \
                         WII5_STORAGE_SDBLOCK \
                         WII5_RTC \
                         F(x)=x \
                         PSTR(x)=x \
                         PROGMEM=

# --- Misc --------------------------------------------------------------------
HAVE_DOT               = NO
GENERATE_TREEVIEW      = YES
DISABLE_INDEX          = NO
FULL_SIDEBAR           = NO
TAB_SIZE               = 2
