-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 1.29 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aleon-ca <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/08/04 05:28:19 by aleon-ca #+# #+# #
# Updated: 2020/09/15 09:03:40 by aleon-ca ### ########.fr #
# #
# **************************************************************************** #
SRCS = ft_strlen.s ft_strcpy.s ft_strcmp.s ft_strdup.s ft_write.s ft_read.s
OBJS = ${SRCS:.s=.o}
NAME = libasm.a
LIB_FLAGS = -L. -lasm
GCC = gcc -Werror -Wextra -Wall
COMPILE = ar rc ${NAME} ${OBJS}
RM = rm -f
.s.o:
nasm -f macho64 $< -o ${<:.s=.o}
$(NAME): ${OBJS}
${COMPILE}
test:
${GCC} ${LIB_FLAGS} tester.c
clear && ./a.out
all: ${NAME}
clean:
${RM} ${OBJS}
fclean: clean
${RM} ${NAME}
re: fclean all