-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 1.31 KB
/
Makefile
File metadata and controls
41 lines (33 loc) · 1.31 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tcharlat <tcharlat@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2014/01/02 00:45:44 by tcharlat #+# #+# #
# Updated: 2014/01/02 02:46:17 by tcharlat ### ########.fr #
# #
# **************************************************************************** #
.PHONY: all clean fclean re
CC = gcc
F = -Wall -Wextra -Werror -Weverything
I = ./includes/ft_strings.h
NAME = libft_strings.a
S = ft_newistr.c
S += ft_strtoistr.c
S += ft_freeistr.c
S += ft_putistr.c
O = $(S:.c=.o)
all: $(NAME)
$(NAME): $(O) $(I) Makefile
@echo "Compiling lib ft_strings"
@ar rc $@ $(O)
@ranlib $@
%.o: ./src/%.c $(I) Makefile
@gcc -c $(F) -I./includes/ $<
clean:
@rm -f $(O)
fclean: clean
@rm -f $(NAME)
re: fclean all