fix make file parsing can get arguments values

This commit is contained in:
2025-04-25 23:08:19 +02:00
parent 77668368ab
commit 149ab9e725
3 changed files with 126 additions and 24 deletions

View File

@ -12,13 +12,13 @@ OBJS = $(addprefix $(OBJS_DIR)/,$(SRCS:.c=.o))
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(FLAGS) $^ -o $@
$(NAME): $(OBJS_DIR) $(OBJS)
$(CC) $(FLAGS) $(OBJS) -o $@
$(OBJS_DIR):
mkdir $(OBJS_DIR)
$(OBJS_DIR)/%.o: $(SRCS_DIR)/%.c $(OBJS_DIR)
$(OBJS_DIR)/%.o: $(SRCS_DIR)/%.c
$(CC) $(FLAGS) -c $< -o $@
clean: