feat: re and fclean rules in Makefile
This commit is contained in:
parent
4027d74f68
commit
0650802fe0
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue