-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (37 loc) · 1.66 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#******************************************************************************#
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: acamaras <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/19 14:24:03 by acamaras #+# #+# #
# Updated: 2022/01/19 14:24:14 by acamaras ### ########.fr #
# #
#******************************************************************************#
NAME = libftprintf.a
EXE = ft_printf
FLAGS = -Wall -Wextra -Werror
LIBFT_FOLDER = ./libft/
LIB = ./libft/libft.a
LIB_OBJ = ./libft/*.o
SRCS1 = ./src/ft_printf.c ./src/checks.c ./src/convert.c ./src/helper.c \
./src/hex_and_octal.c ./src/int_and_uint.c ./src/len_modifiers.c ./src/pointer.c \
./src/pointer.c ./src/string_and_char.c ./src/iffloat.c ./src/ft_ftoa.c ./src/helper2.c
OBJS = $(subst .c,.o,$(subst src/,,$(SRCS1)))
INCL = -I ./includes/ -I ./libft/includes/
all: $(NAME)
$(NAME): $(SRCS1)
@make -s -C $(LIBFT_FOLDER)
@cp $(LIB) ./$(NAME)
@gcc $(FLAGS) $(INCLUDES) -c $(SRCS1)
@ar rc $(NAME) $(OBJS)
ranlib $(NAME)
clean:
@rm -f $(OBJS) $(LIB_OBJ)
@make -s clean -C libft
fclean: clean
@rm -f $(NAME)
@make -s fclean -C libft
re: fclean all
.PHONY: clean fclean re all