-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (35 loc) · 805 Bytes
/
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
SRC= ft_strlen.s \
ft_strcpy.s \
ft_strcmp.s \
ft_write.s \
ft_read.s \
ft_strdup.s
OBJS= $(SRC:.s=.o)
NAME= libasm.a
$(NAME): $(OBJS)
@ar -rc $(NAME) $(OBJS)
@ranlib $(NAME)
.s.o:
@nasm -f macho64 ft_strlen.s
@nasm -f macho64 ft_strcpy.s
@nasm -f macho64 ft_strcmp.s
@nasm -f macho64 ft_write.s
@nasm -f macho64 ft_read.s
@nasm -f macho64 ft_strdup.s
clear
@echo "\033[32mCompilación exitosa\033[0m"
all: $(NAME)
clean:
@rm $(OBJS)
clear
@echo "\033[32mArchivos .o borrados con éxito\033[0m"
fclean:
@rm -f $(OBJS) libasm.a test
clear
@echo "\033[32mArchivos .o y .a borrados con éxito\033[0m"
re: fclean all
test:
@make
@gcc -Wall -Werror -Wextra /Users/abello-r/Desktop/proyectos/correccion/main.c -L. -lasm -o test
@./test
.PHONY: all clean re fclean .s.o test