编写简单的Makefile文件

makefile中的编写内容如下:

www:hello.c x.h
        gcc hello.c -o hello
clean:
        rm hello

  www:hello.c  x.h 表示生成www这个文件需要hello.c 和 x.h这两个文件

     rm hello 表示在shell中执行make clean 时会执行rm  hello 即删除hello这个文件

原文地址:https://www.cnblogs.com/chen9510/p/6234725.html