Skip to content

Commit

Permalink
makefile now explicits all source files as required by norm
Browse files Browse the repository at this point in the history
  • Loading branch information
asantiago committed Apr 27, 2021
1 parent 7c28f3c commit 9de8539
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,23 @@
# #
# **************************************************************************** #

SOURCES = $(wildcard srcs/*.c)
OBJECTS = $(patsubst %.c,%.o, $(SOURCES))
#DIR_SOURCES = srcs

SRCS = ft_fetch.c ft_fill.c ft_isdigit.c ft_isspecifier.c ft_printf.c\
ft_putchar.c ft_putnbr.c ft_putnbr_h.c ft_putnbr_u.c ft_putstr.c ft_putstr_n.c\
ft_strdup.c ft_str_reverse.c ft_strdup.c ft_strlen.c ft_treat_type_c.c\
ft_treat_type_d.c ft_treat_type_p.c ft_treat_type_perc.c ft_treat_type_s.c\
ft_treat_type_u.c ft_treat_type_x.c\

#SOURCES = $(addprefix $(DIR_SOURCES)/,$(SRCS))
SOURCES = $(addprefix srcs/,$(SRCS))
OBJECTS = $(patsubst %.c,%.o, $(SOURCES))
CC = gcc
CFLAGS = -Wall -Wextra -Werror -g
NAME = libftprintf.a
RM = rm -f
AR = ar -src

.PHONY: all clean fclean re bonus

all: $(NAME)

$(NAME): $(OBJECTS)
Expand All @@ -34,4 +40,4 @@ fclean:

re: fclean all

bonus: #for later
.PHONY: all clean fclean re

0 comments on commit 9de8539

Please sign in to comment.