-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (35 loc) · 1.4 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jacku <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/12/08 11:05:00 by jacku #+# #+# #
# Updated: 2022/12/08 18:10:42 by jacku ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
FLAGS = -Wall -Werror -Wextra
AS = nasm
ASFLAGS = -felf64
LIBASM = inc/libasm.h
AR = ar crs
RM = rm -rf
FILES = srcs/ft_strlen srcs/ft_strcmp srcs/ft_strcpy srcs/ft_write \
srcs/ft_read srcs/ft_strdup
OBJ = $(FILES:=.o)
NAME = libasm.a
.PHONY: all bonus clean fclean re
all: $(NAME) test
$(NAME): $(OBJ)
$(AR) $(NAME) $(OBJ)
%.o: %.s
$(AS) $(ASFLAGS) $< -o $@
test:
$(CC) $(FLAGS) $(OBJ) ./tests/tester.c -L$(LIBASM) -o ./tests/tester
clean:
$(RM) $(OBJ)
fclean: clean
$(RM) $(NAME) tester
re: fclean all