-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 1.51 KB
/
Makefile
File metadata and controls
49 lines (40 loc) · 1.51 KB
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
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: ivork <ivork@student.codam.nl> +#+ #
# +#+ #
# Created: 2021/01/16 15:10:04 by ivork #+# #+# #
# Updated: 2021/01/16 15:10:04 by ivork ######## odam.nl #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRCS = ft_printf.c \
ft_printf_utils.c \
ft_print_char.c \
ft_print_num.c \
ft_print_pos.c \
ft_print_neg.c \
ft_print_point.c
OBJ_FILES = $(SRCS:%.c=%.o)
HEADER_FILE = ft_printf.h
FLAGS = -Wall -Wextra -Werror
COMPILER = gcc
LIBFT = libft/libft.a
all: $(NAME)
$(NAME): $(LIBFT) $(OBJ_FILES)
cp $< $@
ar -crs $@ $(OBJ_FILES)
%.o: %.c $(HEADER_FILES)
$(CC) -c $(FLAGS) -o $@ $<
$(LIBFT):
make -C libft
clean:
make fclean -C libft
rm -f $(OBJ_FILES)
fclean: clean
rm -f $(LIBFT)
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re