APP_NAME = test
APP_OBJS = main.o
CC = gcc
INC = ./
CFLAG += -fPIC -ldl -g -lpthread
.PHONY: all
all : $(APP_NAME)
$(APP_NAME) : $(APP_OBJS)
$(CC) $(CFLAG) $(APP_OBJS) -o $(APP_NAME)
%.o : %.c
$(CC) -c $(CFLAG) $^ -o $@
.PHONY: clean
clean:
rm -f *.o
rm -f $(APP_NAME) $(APP_OBJS)
Linux 3 Makefile模版
猜你喜欢
转载自blog.csdn.net/zzj244392657/article/details/92554557
今日推荐
周排行