-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (43 loc) · 1.52 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
54
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: abobas <[email protected]> +#+ #
# +#+ #
# Created: 2020/04/29 01:21:19 by abobas #+# #+# #
# Updated: 2020/09/03 21:09:55 by abobas ######## odam.nl #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRC_DIR = ./src/
SRC = printf.o \
printf_struct.o \
printf_read_1.o \
printf_read_2.o \
printf_read_3.o \
printf_write_1.o \
printf_write_2.o \
printf_arg_d.o \
printf_arg_u.o \
printf_arg_x_1.o \
printf_arg_x_2.o \
printf_arg_s.o \
printf_arg_p.o \
printf_arg_c.o \
printf_arg_per.o \
printf_utility_1.o \
printf_utility_2.o \
printf_utility_3.o
SRC := $(SRC:%=$(SRC_DIR)%)
HEADER = src/printf.h
all: $(NAME)
$(NAME): $(SRC) $(HEADER)
ar rcs $(NAME) $(SRC)
%.o: %.c $(HEADER)
gcc -c -Wall -Wextra -Werror -o $@ $<
clean:
rm -f $(SRC)
fclean: clean
rm -f $(NAME)
re: fclean all