优化makefile (#352)

This commit is contained in:
YJwu2023
2023-08-31 17:54:49 +08:00
committed by GitHub
parent 2dd9f0c750
commit c757940bd6
11 changed files with 71 additions and 70 deletions

View File

@ -1,8 +1,10 @@
all: video.o
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
CFLAGS += -I .
.PHONY: all
video.o: video.c
$(CC) $(CFLAGS) -c video.c -o video.o
all: $(OBJ)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@