Files
notes_estom/C++/libuv库/code/013/Makefile
2021-09-07 10:39:42 +08:00

26 lines
448 B
Makefile

CC=gcc
SRC = $(wildcard *.c */*.c)
OBJS = $(patsubst %.c, %.o, $(SRC))
DEP_FILES := $(patsubst %, .%.d,$(OBJS))
DEP_FILES := $(wildcard $(DEP_FILES))
FLAG = -g -Werror -I. -Iinclude -lpthread -luv -lcurl
TARGET = targets
$(TARGET):$(OBJS)
$(CC) -o $@ $^ $(FLAG)
ifneq ($(DEP_FILES),)
include $(DEP_FILES)
endif
%.o:%.c
$(CC) -o $@ -c $(FLAG) $< -g -MD -MF .$@.d
clean:
rm -rf $(TARGET) $(OBJS)
distclean:
rm -rf $(DEP_FILES)
.PHONY:clean