feat: re and fclean rules in Makefile

This commit is contained in:
lohhiiccc 2026-06-12 14:41:18 +02:00
parent 4027d74f68
commit 0650802fe0

View file

@ -20,7 +20,7 @@ SRCS=$(SRC_DIR)/ft_strlen.asm \
OBJS=$(patsubst $(SRC_DIR)/%.asm,$(OBJ_DIR)/%.o,$(SRCS)) OBJS=$(patsubst $(SRC_DIR)/%.asm,$(OBJ_DIR)/%.o,$(SRCS))
DEPS=$(OBJS:.o=.d) DEPS=$(OBJS:.o=.d)
.PHONY: all clean dirs static shared .PHONY: all clean fclean re dirs static shared
all: dirs $(STATIC_LIB) $(SHARED_LIB) all: dirs $(STATIC_LIB) $(SHARED_LIB)
@ -44,6 +44,13 @@ test: test.c $(STATIC_LIB)
$(CC) $(CFLAGS) test.c -L. -l$(LIB_NAME) -o test -Wl,-rpath=. $(CC) $(CFLAGS) test.c -L. -l$(LIB_NAME) -o test -Wl,-rpath=.
clean: clean:
rm -rf $(OBJ_DIR) $(STATIC_LIB) $(SHARED_LIB) test $(RM) -rf $(OBJ_DIR)
fclean: clean
$(RM) $(STATIC_LIB) $(SHARED_LIB) test
re: fclean
$(MAKE) all
-include $(DEPS) -include $(DEPS)