CC=gcc CFLAGS=-g -Wall #OBJPATH=./build SOURCES=$(wildcard *.c ./core/*.c) OBJECTS=$(addprefix ./, $(addsuffix .o, $(basename $(SOURCES)))) TARGET=ds all: $(TARGET) $(TARGET) : $(OBJECTS) $(CC) $(CFLAGS) -o $@ $(OBJECTS) -lpthread %.o : %.c $(CC) $(CFLAGS) -o $@ -c $< clean : -rm $(OBJECTS) $(TARGET)通用makefile模板,留做备份
makefile 模板
最新推荐文章于 2024-06-03 10:28:17 发布