-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (64 loc) · 1.92 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ybarbier <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/03/30 14:18:45 by ybarbier #+# #+# #
# Updated: 2015/03/30 14:18:49 by ybarbier ### ########.fr #
# #
# **************************************************************************** #
#____________CONFIG____________#
NAME = libfts.a
NAME_TEST = test
PATH_SRC = ./src/
#PATH_OBJ = ./obj/
#PATH_INC = ./libft/includes/
AS = nasm
ASFLAGS = -f macho64
CC = cc -Wall -Wextra -Werror
# CFLAGS = -f macho64
# CFLAGS = -Ofast -I $(PATH_INC) -g
LIBS = -L ./ -lfts
#____________FILES____________#
SRC = ft_bzero.s \
ft_isalpha.s \
ft_isdigit.s \
ft_isalnum.s \
ft_isascii.s \
ft_isprint.s \
ft_toupper.s \
ft_tolower.s \
ft_puts.s \
ft_strlen.s \
ft_strcat.s \
ft_memset.s \
ft_memcpy.s \
ft_strdup.s \
ft_cat.s \
ft_strcmp.s \
ft_putchar.s \
ft_putchar_fd.s \
ft_memcmp.s \
ft_strequ.s \
ft_strcpy.s \
ft_memdel.s \
ft_memalloc.s \
ft_strnew.s
OBJ = $(addprefix $(PATH_SRC), $(SRC:.s=.o))
#____________REGLES____________#
.PHONY: clean fclean re test clean_test
all: $(NAME)
$(NAME): $(OBJ)
ar rc $(NAME) $(OBJ)
ranlib $(NAME)
clean:
/bin/rm -f $(OBJ)
fclean: clean
/bin/rm -f $(NAME)
re: fclean all
test: $(OBJ) main.c
$(CC) main.c $(LIBS) -o $(NAME_TEST)
clean_test:
/bin/rm -f $(NAME_TEST)