diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..d3313871a7deed673a3823afa426bd1fe4b0d365 --- /dev/null +++ b/README.en.md @@ -0,0 +1,43 @@ +# GCC Compilation Tool Script + +This project provides a set of Node.js-based scripts to automate C/C++ code processing through the GCC compilation pipeline, including preprocessing, compilation, assembly, linking, and execution. It simplifies understanding and utilizing the GCC compilation process. + +## Main Features + +- **Preprocessing**: Execute the code preprocessing step. +- **Compilation**: Convert preprocessed code into assembly code. +- **Assembly**: Convert assembly code into target machine code. +- **Linking**: Link object files into an executable file. +- **Execution**: Run the generated executable and output the results. + +## Script Dependencies + +- Node.js environment (v14 or higher recommended). +- GCC installed and environment variables properly configured. + +## Usage Instructions + +1. Ensure Node.js and GCC are installed. +2. Place your C/C++ source code in the project directory. +3. Run the scripts to execute the compilation pipeline. + +## Example Usage + +```bash +node scripts/gcc_compile.js +``` + +The script will automatically execute the full GCC compilation pipeline and output intermediate results as well as the final execution result. + +## Contribution Guidelines + +Contributions and improvement suggestions are welcome! Please follow these steps: +1. Fork this repository. +2. Create a new branch (`git checkout -b feature/new-feature`). +3. Commit your changes (`git commit -m 'Add new feature'`). +4. Push to the remote branch (`git push origin feature/new-feature`). +5. Submit a Pull Request. + +## Open Source License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..da26dc241ea87e24e82c0c3f54c1f59e6098c219 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +根据项目结构和组件信息,以下是适用于此项目的 README.md 内容: + +```markdown +# GCC 编译工具脚本 + +此项目提供一组基于 Node.js 的脚本,用于通过 GCC 编译流程完成 C/C++ 代码的预处理、编译、汇编、链接以及运行等操作。它简化了对 GCC 编译过程的理解和使用。 + +## 主要功能 + +- **预处理**:执行代码的预处理步骤。 +- **编译**:将预处理后的代码转换为汇编代码。 +- **汇编**:将汇编代码转换为目标机器码。 +- **链接**:将目标文件链接为可执行文件。 +- **运行**:执行生成的可执行文件并输出结果。 + +## 脚本依赖 + +- Node.js 环境(v14 或更高版本推荐)。 +- GCC 已安装并配置好环境变量。 + +## 使用说明 + +1. 确保已安装 Node.js 和 GCC。 +2. 将 C/C++ 源代码放置在项目目录中。 +3. 运行脚本以执行编译流程。 + +## 示例用法 + +```bash +node scripts/gcc_compile.js +``` + +脚本将自动执行 GCC 的完整编译流程,并输出中间结果和最终执行结果。 + +## 贡献指南 + +欢迎贡献代码或提出改进建议!请遵循以下步骤: +1. Fork 本仓库。 +2. 创建新分支(`git checkout -b feature/new-feature`)。 +3. 提交更改(`git commit -m 'Add new feature'`)。 +4. 推送至远程分支(`git push origin feature/new-feature`)。 +5. 提交 Pull Request。 + +## 开源许可 + +本项目采用 MIT 许可证,详细信息请参阅 [LICENSE](LICENSE) 文件。 +``` \ No newline at end of file