-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 1.31 KB
/
Copy pathMakefile
File metadata and controls
43 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
42
43
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: rvan-sch <rvan-sch@student.codam.n> +#+ #
# +#+ #
# Created: 2020/11/08 20:09:16 by rvan-sch #+# #+# #
# Updated: 2020/11/08 20:32:45 by rvan-sch ######## odam.nl #
# #
# **************************************************************************** #
SRCS = ft_strlen.s ft_strcmp.s ft_read.s ft_strdup.s ft_write.s ft_strcpy.s
CC = gcc
CFLAGS = -I. -Wall -Werror -Wextra
NAME = libasm.a
OBJ := $(SRCS:.s=.o)
all: $(NAME)
$(NAME): $(OBJ)
ar rc $(NAME) $(OBJ)
%.o: %.s
nasm -f macho64 $< -o $@
clean:
-rm -f $(OBJ)
fclean: clean
-rm -f $(NAME)
-rm -f a.out test.txt
-rm -rf a.out.dSYM
re: fclean all
test: $(NAME)
make re
$(CC) -g -L. -lasm main.c
./a.out
.PHONY: clean fclean re all test