怎么写一个简单的makefile ClarkLee 2023-06-12 43 阅读1分钟 define the compiler to use CC = gcc define compile-time flags CFLAGS = -Wall -g define the target executable TARGET = myprogram all: $(TARGET) (TARGET):myprogram.c(TARGET): myprogram.c (TARGET):myprogram.c(CC) (CFLAGS)−o(CFLAGS) -o (CFLAGS)−o(TARGET) myprogram.c clean: (RM)(RM) (RM)(TARGET)