it it a makefile for multi-dir project but it just a single file
Go to file
Alvin Young 999507a72e 更新 Makefile
更新Windows的兼容性
2025-12-08 15:40:47 +08:00
.gitignore add ️ : 添加测试文件和修改生成规则 2024-08-12 17:17:43 +08:00
LICENSE Initial commit 2024-01-23 19:17:11 +08:00
main.c add ️ : 添加测试文件和修改生成规则 2024-08-12 17:17:43 +08:00
Makefile 更新 Makefile 2025-12-08 15:40:47 +08:00
README_EN.md Update README_EN.md 2024-01-27 16:23:18 +08:00
README.md Update README.md 2024-01-27 16:20:32 +08:00

A Makefile in C project for lazy developer

The content below were generated by AI

This Makefile is designed to be user-configurable and supports different operating systems. It uses the gcc compiler by default, but you can change it to your desired compiler by modifying the CC variable.

To use this Makefile, follow these steps:

  1. Set the CC variable to the path of your desired compiler. By default, it is set to /usr/bin/gcc. If you're on Windows, you can uncomment the second CC line and provide the path to your GCC compiler.
  2. Set the PROJECT variable to the name of your project.
  3. Specify the directories where your source files and header files are located by modifying the FILES_PATH variable. By default, it is set to the current directory (./).
  4. The Makefile will automatically find all the source files (.c) and header files (.h) within the specified directories.
  5. The Makefile also extracts the include directories from the found files and sets them as include flags using the INC_DIRS variable.
  6. To compile the project, simply run make all in the terminal. This will compile the source files, headers, and include directories using the specified compiler and output the executable file with the name specified in the PROJECT variable. 7.To clean the project, run make clean. This will remove the generated executable file.

Please note that this Makefile supports Windows, Linux, and macOS operating systems. It automatically detects the operating system and uses the appropriate commands for cleaning the project.