-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 1.34 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jereligi <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/02/20 12:01:33 by jereligi #+# #+# #
# Updated: 2020/02/20 13:16:57 by jereligi ### ########.fr #
# #
# **************************************************************************** #
NAME = libasm
NAME_LIB = libasm.a
SRCS = ft_write.s \
ft_read.s \
ft_strcmp.s \
ft_strcpy.s \
ft_strdup.s \
ft_strlen.s \
CC = gcc
CFLAGS = -Wall -Wextra -Werror
NASM = nasm
NASMFLAGS = -f macho64
OBJ = $(SRCS:.s=.o)
%.o : %.s
$(NASM) $(NASMFLAGS) $< -o $@
all : $(NAME)
$(NAME) : $(OBJ)
ar rcs $(NAME_LIB) $(OBJ)
ccproject :
$(CC) $(CFLAGS) main.c $(NAME_LIB)
clean :
rm -f $(OBJ)
fclean : clean
rm -f $(NAME_LIB)
rm -f ./a.out
re : fclean all