结论:LinuxCNC rs274ngc 源码移植边界继续收拢。已将 rs274ngc 头文件纳入 manifest 跟踪,core 编译组仍只包含可编译源文件;启用 CNC_SIM_ENABLE_LINUXCNC_RS274_BACKEND 时 API 默认使用 LinuxCNC rs274 后端;M428/M429/M430 与 5axis/TRT/TDR/RTCP 相关路径继续保持来自 LinuxCNC 源码或 remap 配置的薄桥接。 验证:./test-linuxcnc-source-syntax.sh;./test-linuxcnc-api-native.sh;./test-native.sh;./test-linuxcnc-source-link.sh。
29 lines
955 B
Bash
Executable File
29 lines
955 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
|
cxx=${CXX:-g++}
|
|
build_dir=$(mktemp -d "${TMPDIR:-/tmp}/cnc_sim_rs274_objects.XXXXXX")
|
|
manifest=${1:-linuxcnc-rs274-source-files.txt}
|
|
|
|
trap 'rm -rf "$build_dir"' EXIT
|
|
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs.sh "$manifest"
|
|
|
|
common_flag_output=$(LINUXCNC_ROOT="$linuxcnc_root" ./list-linuxcnc-source-common-cxxflags.sh --python)
|
|
mapfile -t common_flags <<<"$common_flag_output"
|
|
|
|
source_output=$(LINUXCNC_ROOT="$linuxcnc_root" ./list-linuxcnc-source-manifest-sources.sh "$manifest" core full)
|
|
mapfile -t sources <<<"$source_output"
|
|
|
|
source_index=0
|
|
for source in "${sources[@]}"; do
|
|
obj="$build_dir/linuxcnc_${source_index}.o"
|
|
"$cxx" "${common_flags[@]}" -c "$source" -o "$obj"
|
|
source_index=$((source_index + 1))
|
|
done
|
|
|
|
echo "linuxcnc rs274 source object build passed (${#sources[@]} objects)"
|
|
echo "built objects in $build_dir"
|