forked from templates/base
模板项目可以正常make编译
This commit is contained in:
4
Makefile
4
Makefile
@@ -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
|
||||
|
Reference in New Issue
Block a user