-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (49 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jfelty <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/09/14 10:38:32 by jfelty #+# #+# #
# Updated: 2019/11/06 23:26:46 by jfelty ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
CC = gcc
CFLAGS = -I.
SRC = ft_printf.c \
populate.c \
dispatch.c \
print.c \
format_help.c \
format_help2.c \
format_cspf.c \
format_diouxx.c
OBJ = $(SRC:.c=.o)
OB = ./*.o
FT_LIB = ./src/libft/libft.a
FT_LIB_OB = ./src/libft/*.o
all: $(NAME)
$(NAME): $(OBJ) lib
ar rc $(NAME) $(OB) $(FT_LIB_OB)
ranlib $(NAME)
lib:
make -C src/libft/
test: lib
$(CC) $(CFLAGS) $(SRC) test.c -g src/libft/libft.a -o test.out
#pflib:
# @ar rc $(NAME) $(OBJ)
# @ranlib $(NAME)
# @echo "libftprintf.a created"
# https://github.com/SLO42/ft_printf/blob/master/ft_printf_v2/Makefile
clean:
rm -rf $(OBJ)
make -C src/libft/ clean
fclean: clean
rm -f $(NAME)
rm -f libft.a
rm -f test.out
make -C src/libft/ fclean
re: fclean all
.PHONY: lib out clean all fclean re