用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SWMFsoftware/FLEKS --skill build-fleks命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Create new compiled .cpp/.h files or selectable FLEKS user source templates following project conventions
Build documentation from code comments and LaTeX sources
Find unused variables, check formatting, apply fixes following FLEKS coding standards
基于 SOC 职业分类
正在显示 SKILL.md
| name | build-fleks |
| description | Compile FLEKS standalone or as an SWMF component, build the converter, and regenerate compile_commands.json |
This skill compiles the FLEKS project and ensures IntelliSense stays up to date.
mpicxx and the Fortran linker from the SWMF build environment must be
available in PATH.Config.pl and Makefile.def provide the AMReX
include/library paths.Makefile.conf and Makefile.def are generated by ./Config.pl -install
when missing. In a pure FLEKS checkout, Config.pl can clone/use local
share, util, and AMReX dependencies.All commands should be run from the FLEKS project root (i.e., the
directory containing this .agent/ folder).
If a clean build is requested, run:
make clean
For a complete reset (removes all generated files):
make distclean
For standalone executable:
make EXE -j8
make FLEKS -j8 is an alias for make EXE -j8.
For the SWMF component library:
make LIB -j8
Use make EXE for standalone validation. make LIB is only valid in a built
SWMF tree where libSHARE.a and con_comp_param.mod already exist.
Both EXE/FLEKS and LIB invoke compile_commands and CONVERTER
automatically, so successful builds should refresh compile_commands.json and
bring bin/converter.exe up to date.
src/Makefile (SEARCH_C)
and generated values in Makefile.conf / Makefile.def.cpp files are listed in
the SRCS variable in src/Makefilemake LIB errors outside SWMF -> Use make EXE, or build/configure the
parent SWMF tree firstMakefile.def, Makefile.conf, and AMREXSEARCHAfter successful build, verify that compile_commands.json was regenerated:
ls -la compile_commands.json
This file is used by VS Code's C/C++ IntelliSense.
| Target | Description |
|---|---|
make / make EXE | Build standalone executable (bin/FLEKS.exe) |
make FLEKS | Alias for make EXE |
make LIB | Build library for SWMF integration (src/libFLEKS.a) |
make CONVERTER | Build converter tool (bin/converter.exe) |
make install | Create bin/ and include/Constants.h |
make clean | Remove object files |
make distclean | Remove all generated files |
make compile_commands | Regenerate compile_commands.json only |
The C++ compilation flags are set in Makefile.conf (via SWMF):
| Variable | Typical Value | Purpose |
|---|---|---|
DEBUGC | -g -Wall -Wextra -Wno-unused-parameter | Debug symbols and warnings |
OPT3 | -O0 (debug) or -O3 (release) | Optimization level |
FLAGC_EXTRA | -D_${COMPONENT}_COMPONENT_ | Component preprocessor flag |
To enable a debug build, ensure OPT3 is set to -O0 in the SWMF
Makefile.conf (it is -O0 by default during development).
bin/FLEKS.exe is updated for make EXE / make FLEKSsrc/libFLEKS.a is updated for make LIBbin/converter.exe is updated by EXE, FLEKS, LIB, or CONVERTERcompile_commands.json is present and current