-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (40 loc) · 1.43 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: aaubin <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2013/11/26 22:57:40 by aaubin #+# #+# #
# Updated: 2014/02/14 20:01:16 by aleger ### ########.fr #
# #
# **************************************************************************** #
CC=clang
LKFLAGS=-Wall -Wextra -pedantic -Werror
CFLAGS=-Wall -Wextra -pedantic -Werror
LDFLAGS=-g
NAME=libvector.a
SRC=c_vector.c\
c_vector_ops.c\
c_vector_iterate.c\
c_vector_alloc.c\
c_vector_memory.c\
c_vector_capacity.c\
c_vector_remove.c\
c_vector_access.c\
c_vector_ops.c
NOM=$(basename $(SRC))
OBJ=$(addsuffix .o, $(NOM))
all: $(NAME)
$(NAME): $(OBJ)
ar rc $(NAME) $^
ranlib $(NAME)
%.o: %.c
$(CC) -g -o $@ -c $< $(CFLAGS)
clean:
@rm -rf $(OBJ)
fclean: clean mrproper
re: fclean all
.PHONY: clean mrproper
mrproper: clean
@rm -rf $(NAME)