这是我的生成文件:
CFLAGS=-Wall -g -O2
clean:
rm -f ex1
当我运行一个脚本时,例如,这个(ex3.c
):
#include <stdio.h>
int main()
{
int age = 10;
int height = 72;
printf("I am %d years old.\n", age);
printf("I am %d inches tall.\n", height);
return 0;
}
我收到以下错误:
$ g++ Makefile.c -o makefile
Makefile.c:1:1: error: 'CFLAGS' does not name a type
CFLAGS=-Wall -g
^g++ ex3.c -o ex3
$