chore(Makefile): better libs rules
This commit is contained in:
parent
b16dd2c39d
commit
7b240b0c11
6
Makefile
6
Makefile
|
@ -28,7 +28,7 @@ WHITE = \033[0m
|
|||
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): ft_printf $(OBJ) $(INC)
|
||||
$(NAME): $(LIB) $(OBJ) $(INC)
|
||||
@$(CC) $(CFLAGS) $(OBJ) $(LIB) -o $(NAME)
|
||||
@echo -e "$(GREEN)[OK]$(WHITE) $(NAME)"
|
||||
|
||||
|
@ -39,7 +39,7 @@ $(OBJ_DIR)%.o: $(SRC_DIR)%.c $(INC)
|
|||
@$(CC) $(CFLAGS) -I $(INC_DIR) -I ft_printf/inc -o $@ -c $<
|
||||
@echo -e "$(CYAN)[CC]$(WHITE) $(<:$(SRC_DIR)%=%)"
|
||||
|
||||
ft_printf:
|
||||
$(LIB):
|
||||
@echo -e "$(PURPLE)[MAKE]$(WHITE) ft_printf"
|
||||
@make --no-print-directory -C ft_printf
|
||||
|
||||
|
@ -57,4 +57,4 @@ fclean:
|
|||
|
||||
re: fclean all
|
||||
|
||||
.PHONY: all ft_printf clean fclean re
|
||||
.PHONY: all clean fclean re
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# Woody Woodpacker
|
||||
|
||||
Woody Woodpacker is a simple ELF packer that will encrypt the text section of an ELF program and add a payload that will write "....WOODY...." and decypher the text section before executing it normally.
|
|
@ -25,6 +25,8 @@ INC = $(addprefix $(INC_DIR), $(INC_FILE))
|
|||
CC = gcc
|
||||
CFLAGS = -Wall -Werror -Wextra
|
||||
|
||||
LIB = libft/libft.a
|
||||
|
||||
GREEN = \033[32m
|
||||
RED = \033[31m
|
||||
ORANGE = \033[33m
|
||||
|
@ -34,8 +36,8 @@ WHITE = \033[0m
|
|||
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): libft $(OBJ) $(INC)
|
||||
@cp libft/libft.a $(NAME)
|
||||
$(NAME): $(LIB) $(OBJ) $(INC)
|
||||
@cp $(LIB) $(NAME)
|
||||
@ar -rcs $(NAME) $(OBJ)
|
||||
@ranlib $(NAME)
|
||||
@echo -e "$(GREEN)[OK]$(WHITE) $(NAME)"
|
||||
|
@ -47,7 +49,7 @@ $(OBJ_DIR)%.o: $(SRC_DIR)%.c libft/ $(INC)
|
|||
@$(CC) $(CFLAGS) -I $(INC_DIR) -I libft/inc -o $@ -c $<
|
||||
@echo -e "$(CYAN)[CC]$(WHITE) $(<:$(SRC_DIR)%=%)"
|
||||
|
||||
libft:
|
||||
$(LIB):
|
||||
@echo -e "$(PURPLE)[MAKE]$(WHITE) libft"
|
||||
@make --no-print-directory -C ./libft
|
||||
|
||||
|
@ -65,4 +67,4 @@ fclean:
|
|||
|
||||
re: fclean all
|
||||
|
||||
.PHONY: all libft clean fclean re
|
||||
.PHONY: all clean fclean re
|
||||
|
|
Loading…
Reference in New Issue