makefile 最简单用法

hello.c

#include <stdio.h>
int main()
{
    printf("Hello World!\n");
    return 0;
}

hello : hello.o
        gcc -o hello hello.o

hello.o : hello.c
        gcc -c hello.c

clean : 
        rm -rf    hello.o


make

./hello