如何为 C 项目编写简单的 makefile?

How do I write a simple makefile for a C project?

我试过阅读有关编写 makefile 的文章,但我不明白。我有这样的文件结构。

- project
   - bin
      - main.exe
   - src
      - main.c
   - inc
      - ...
      - ...

我在这里尝试了不同的答案,但对于初学者来说,这些答案很复杂。我的 makefile 中需要三个命令:run compile clean。我正在使用 GCC 作为编译器。

hellomake: hellomake.c hellofunc.c
 gcc -o hellomake hellomake.c hellofunc.c -I.

这是制作 makeFile 的最佳方式。 在某些情况下,您甚至需要下载一个插件。 你用的是什么软件?