summaryrefslogtreecommitdiff
path: root/stacks/crdop/cmake/CRDOPVendorArdopcf.cmake
diff options
context:
space:
mode:
authorinfo@mode42.com <info@mode42.com>2026-08-07 18:23:28 +0000
committerinfo@mode42.com <info@mode42.com>2026-08-07 18:23:28 +0000
commitfa05a5f8238e9e1417235711656e5062ccc843a7 (patch)
tree46fbbd18de54492b59307c16efcc7f3152723238 /stacks/crdop/cmake/CRDOPVendorArdopcf.cmake
Initial push
Diffstat (limited to 'stacks/crdop/cmake/CRDOPVendorArdopcf.cmake')
-rw-r--r--stacks/crdop/cmake/CRDOPVendorArdopcf.cmake127
1 files changed, 127 insertions, 0 deletions
diff --git a/stacks/crdop/cmake/CRDOPVendorArdopcf.cmake b/stacks/crdop/cmake/CRDOPVendorArdopcf.cmake
new file mode 100644
index 0000000..e82c605
--- /dev/null
+++ b/stacks/crdop/cmake/CRDOPVendorArdopcf.cmake
@@ -0,0 +1,127 @@
+# Legacy vendor/ardopcf build (opt-in only; not shipped in MAX25 v1).
+
+include("${CRDOP_ROOT}/cmake/CRDOPCompiler.cmake")
+include("${CRDOP_ROOT}/cmake/CRDOPPlatform.cmake")
+
+option(CRDOP_BUILD_TESTS "Build upstream ardopcf cmocka unit tests" OFF)
+
+set(CRDOP_VENDOR_COMMON
+ lib/rawhid/rawhid.c
+ lib/rockliff/rrs.c
+ lib/ws_server/ws_server.c
+ src/common/ARDOPC.c
+ src/common/ARDOPCommon.c
+ src/common/ardopSampleArrays.c
+ src/common/ARQ.c
+ src/common/BusyDetect.c
+ src/common/FEC.c
+ src/common/FFT.c
+ src/common/HostInterface.c
+ src/common/Locator.c
+ src/common/log_file.c
+ src/common/log.c
+ src/common/Modulate.c
+ src/common/Packed6.c
+ src/common/RXO.c
+ src/common/sdft.c
+ src/common/SoundInput.c
+ src/common/StationId.c
+ src/common/TCPHostInterface.c
+ src/common/txframe.c
+ src/common/wav.c
+ src/common/Webgui.c
+ src/common/noise.c
+ src/common/ardopcf.c
+)
+
+set(CRDOP_VENDOR_SRCS "")
+foreach(rel IN LISTS CRDOP_VENDOR_COMMON CRDOP_PLATFORM_SOURCES)
+ list(APPEND CRDOP_VENDOR_SRCS "${VENDOR_DIR}/${rel}")
+endforeach()
+
+set(TXT2C "${CMAKE_BINARY_DIR}/txt2c")
+add_executable(txt2c "${VENDOR_DIR}/lib/txt2c/txt2c.c")
+crdop_set_compile_options(txt2c)
+set_target_properties(txt2c PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
+
+set(WEBGUI_HTML_C "${CMAKE_BINARY_DIR}/gen-webgui.html.c")
+set(WEBGUI_JS_C "${CMAKE_BINARY_DIR}/gen-webgui.js.c")
+add_custom_command(
+ OUTPUT "${WEBGUI_HTML_C}"
+ COMMAND txt2c "${VENDOR_DIR}/webgui/webgui.html" "${WEBGUI_HTML_C}" webgui_html
+ DEPENDS txt2c "${VENDOR_DIR}/webgui/webgui.html"
+ COMMENT "Embedding webgui.html"
+)
+add_custom_command(
+ OUTPUT "${WEBGUI_JS_C}"
+ COMMAND txt2c "${VENDOR_DIR}/webgui/webgui.js" "${WEBGUI_JS_C}" webgui_js
+ DEPENDS txt2c "${VENDOR_DIR}/webgui/webgui.js"
+ COMMENT "Embedding webgui.js"
+)
+
+add_library(ardopcf_vendor_objs OBJECT
+ ${CRDOP_VENDOR_SRCS}
+ "${WEBGUI_HTML_C}"
+ "${WEBGUI_JS_C}"
+)
+
+target_include_directories(ardopcf_vendor_objs PRIVATE
+ "${CRDOP_ROOT}/include"
+ "${VENDOR_DIR}/src"
+ "${VENDOR_DIR}/lib"
+ ${CRDOP_PLATFORM_INCLUDES}
+)
+
+target_compile_definitions(ardopcf_vendor_objs PRIVATE CRDOP_BUILD=1)
+
+if(WIN32)
+ target_compile_definitions(ardopcf_vendor_objs PRIVATE WIN32 _CRT_SECURE_NO_DEPRECATE)
+endif()
+
+if(APPLE)
+ target_compile_definitions(ardopcf_vendor_objs PRIVATE __APPLE__)
+endif()
+
+crdop_set_compile_options(ardopcf_vendor_objs)
+
+add_executable(crdopc
+ "${CRDOP_ROOT}/src/crdop_version.c"
+ $<TARGET_OBJECTS:ardopcf_vendor_objs>
+)
+
+target_include_directories(crdopc PRIVATE
+ "${CRDOP_ROOT}/include"
+ "${VENDOR_DIR}/src"
+ "${VENDOR_DIR}/lib"
+ ${CRDOP_PLATFORM_INCLUDES}
+)
+
+target_compile_definitions(crdopc PRIVATE CRDOP_BUILD=1)
+
+if(WIN32)
+ target_compile_definitions(crdopc PRIVATE WIN32 _CRT_SECURE_NO_DEPRECATE)
+endif()
+
+if(APPLE)
+ target_compile_definitions(crdopc PRIVATE __APPLE__)
+endif()
+
+crdop_set_compile_options(crdopc)
+target_link_libraries(crdopc PRIVATE ${CRDOP_PLATFORM_LIBS})
+
+add_library(ardopcf_vendor STATIC
+ "${CRDOP_ROOT}/src/crdop_version.c"
+ $<TARGET_OBJECTS:ardopcf_vendor_objs>
+)
+target_include_directories(ardopcf_vendor PUBLIC
+ "${CRDOP_ROOT}/include"
+ "${VENDOR_DIR}/src"
+ "${VENDOR_DIR}/lib"
+ ${CRDOP_PLATFORM_INCLUDES}
+)
+target_compile_definitions(ardopcf_vendor PUBLIC CRDOP_BUILD=1)
+target_link_libraries(ardopcf_vendor PUBLIC ${CRDOP_PLATFORM_LIBS})
+
+include("${CRDOP_ROOT}/cmake/CRDOPTests.cmake")
+
+install(TARGETS crdopc RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com