模板项目可以正常make编译

This commit is contained in:
孟宁
2025-03-05 17:31:48 +08:00
parent c1c5b24fb0
commit 822dc8f869
4 changed files with 10 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
# Makefile for base example
#
include ./make.h
# 目标和源文件
TARGETS = fork execlp
@@ -10,7 +10,7 @@ SOURCES = $(wildcard $(SRC_DIR)/*.c) # 找到所有的 .c 文件
OBJECTS = $(patsubst $(SRC_DIR)/%.c,%.o,$(SOURCES)) # 将 .c 替换为 .o
# 默认目标
all: $(TARGETS)
all: $(TARGETS)
# 链接目标文件生成可执行文件
fork: fork.o