42-archive/42-piscine-c/d12/ex03/Makefile
2016-08-25 20:50:28 +02:00

24 lines
437 B
Makefile

NAME = ft_hexdump
SRC_DIR = srcs/
INCLUDES_DIR = includes/
FUNCTIONS=utilities opps ft_hexdump
FLAGS=-Wall -Wextra -Werror
BINS = $(patsubst %,%.o,$(FUNCTIONS))
.PHONY: all clean fclean re
all: $(NAME)
$(BINS):
gcc -I$(INCLUDES_DIR) $(FLAGS) -c $(patsubst %.o,$(SRC_DIR)%.c,$@)
$(NAME): $(BINS)
gcc -I$(INCLUDES_DIR) $(FLAGS) main.c $(BINS) -o $(NAME)
clean:
/bin/rm -f $(BINS)
fclean: clean
/bin/rm -f $(NAME)
re: fclean all