满庭芳·源流归一
结论: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。
This commit is contained in:
67
list-linuxcnc-source-common-cxxflags.sh
Executable file
67
list-linuxcnc-source-common-cxxflags.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
||||
include_python=0
|
||||
include_core_include=0
|
||||
include_core_src=0
|
||||
syntax_only=0
|
||||
emit_ulapi=1
|
||||
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--python)
|
||||
include_python=1
|
||||
shift
|
||||
;;
|
||||
--core-include)
|
||||
include_core_include=1
|
||||
shift
|
||||
;;
|
||||
--core-src)
|
||||
include_core_src=1
|
||||
shift
|
||||
;;
|
||||
--syntax-only)
|
||||
syntax_only=1
|
||||
shift
|
||||
;;
|
||||
--no-ulapi)
|
||||
emit_ulapi=0
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "unknown source cxxflag option: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs.sh --root-only
|
||||
|
||||
python_includes=()
|
||||
if [[ "$include_python" -eq 1 ]]; then
|
||||
python_include_output=$(python3.13-config --includes 2>/dev/null || python3-config --includes)
|
||||
read -r -a python_includes <<<"$python_include_output"
|
||||
fi
|
||||
|
||||
printf '%s\n' \
|
||||
-std=c++17 \
|
||||
$([[ "$emit_ulapi" -eq 1 ]] && printf '%s\n' -DULAPI) \
|
||||
$([[ "$syntax_only" -eq 1 ]] && printf '%s\n' -fsyntax-only) \
|
||||
"${python_includes[@]}" \
|
||||
$([[ "$include_core_include" -eq 1 ]] && printf '%s\n' -I core/include) \
|
||||
$([[ "$include_core_src" -eq 1 ]] && printf '%s\n' -I core/src) \
|
||||
-I "$linuxcnc_root/src" \
|
||||
-I "$linuxcnc_root/src/emc" \
|
||||
-I "$linuxcnc_root/src/emc/nml_intf" \
|
||||
-I "$linuxcnc_root/src/emc/rs274ngc" \
|
||||
-I "$linuxcnc_root/src/emc/motion" \
|
||||
-I "$linuxcnc_root/src/emc/pythonplugin" \
|
||||
-I "$linuxcnc_root/include"
|
||||
Reference in New Issue
Block a user