From fa05a5f8238e9e1417235711656e5062ccc843a7 Mon Sep 17 00:00:00 2001 From: "info@mode42.com" Date: Fri, 7 Aug 2026 18:23:28 +0000 Subject: Initial push --- cmake/MAX25Ax25.cmake | 19 +++++++++++++++++++ cmake/MAX25Platform.cmake | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 cmake/MAX25Ax25.cmake create mode 100644 cmake/MAX25Platform.cmake (limited to 'cmake') diff --git a/cmake/MAX25Ax25.cmake b/cmake/MAX25Ax25.cmake new file mode 100644 index 0000000..53193f6 --- /dev/null +++ b/cmake/MAX25Ax25.cmake @@ -0,0 +1,19 @@ +# MAX25Ax25.cmake — native AX.25 codec only (no upstream bundle). +# +# libax25 / ax25-tools / ax25-apps tarballs under third_party/ax25/ are study +# reference material. max25d ships stacks/daemon/ax25_codec.py + kiss_bridge.py. +# Optional host tools (listen, call, kissattach): install distro ax25-apps / +# ax25-tools or run scripts/build-ax25-deps.sh manually (deprecated for MAX25). + +option(MAX25_BUNDLE_AX25 + "DEPRECATED: build libax25/ax25-tools/ax25-apps from third_party/ax25 tarballs" + OFF) + +if(MAX25_BUNDLE_AX25) + message(WARNING + "MAX25_BUNDLE_AX25=ON is deprecated. " + "Use distro ax25-apps/ax25-tools or scripts/build-ax25-deps.sh manually. " + "max25d uses native ax25_codec.py — no libax25 link required.") +endif() + +message(STATUS "AX.25: native ax25_codec.py (third_party/ax25 study reference only)") diff --git a/cmake/MAX25Platform.cmake b/cmake/MAX25Platform.cmake new file mode 100644 index 0000000..c121551 --- /dev/null +++ b/cmake/MAX25Platform.cmake @@ -0,0 +1,37 @@ +# MAX25-Stack-Lite platform defaults. +# +# Lite ship policy (settled): BayCom/based (stacks/max25-bcpr) is in-scope and +# default ON on every POSIX-like Lite target — see product-repo-rules.md +# "CMake ship profile (Lite)" and design-principles.md. This module must not +# reintroduce the upstream MAX25-Stack default (bcpr opt-in/OFF) here, because +# CMake's option() in the top-level CMakeLists.txt cannot override a CACHE +# variable already created by an earlier include() — this module runs first. + +set(MAX25_SYSTEM "${CMAKE_SYSTEM_NAME}") + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(MAX25_PLATFORM "linux") + set(MAX25_DEFAULT_BUILD_TNCS ON) + set(MAX25_DEFAULT_BUILD_MAX25_BCPR ON) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(MAX25_PLATFORM "freebsd") + set(MAX25_DEFAULT_BUILD_TNCS OFF) + set(MAX25_DEFAULT_BUILD_MAX25_BCPR ON) +elseif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|NetBSD|DragonFly") + set(MAX25_PLATFORM "bsd") + set(MAX25_DEFAULT_BUILD_TNCS OFF) + set(MAX25_DEFAULT_BUILD_MAX25_BCPR ON) +else() + set(MAX25_PLATFORM "generic") + set(MAX25_DEFAULT_BUILD_TNCS OFF) + set(MAX25_DEFAULT_BUILD_MAX25_BCPR OFF) +endif() + +if(NOT DEFINED MAX25_BUILD_TNCS) + set(MAX25_BUILD_TNCS ${MAX25_DEFAULT_BUILD_TNCS} CACHE BOOL "Build stacks/tncs tools (not shipped in Lite; no-op)") +endif() +if(NOT DEFINED MAX25_BUILD_MAX25_BCPR) + set(MAX25_BUILD_MAX25_BCPR ${MAX25_DEFAULT_BUILD_MAX25_BCPR} CACHE BOOL "Build stacks/max25-bcpr BayCom/based SER12 (Lite: in-scope, default ON)") +endif() + +message(STATUS "MAX25 platform=${MAX25_PLATFORM} system=${MAX25_SYSTEM}") -- cgit v1.3.1