This repository was archived by the owner on Jul 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (69 loc) · 1.96 KB
/
Makefile
File metadata and controls
82 lines (69 loc) · 1.96 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: pfichepo <pfichepo@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/03/21 10:28:45 by pfichepo #+# #+# #
# Updated: 2018/03/28 12:36:57 by pfichepo ### ########.fr #
# #
# **************************************************************************** #
# Bonus :
# couleurs nm
# couleurs otool
# reverse nm
# support archive sur nm
# support archive sur otool
# support ARM et tous un tas de CPU
NAME_NM = ft_nm
NAME_OTOOL = ft_otool
CC = clang
CFLAGS = -O0 -g -Wall -Wextra -Werror -I ./includes
SRCSNM = ar.c \
init.c \
lib2.c \
libs.c \
libs2.c \
lists.c \
main.c \
nm.c \
sections.c \
x64.c \
x86.c \
xfat.c \
xfat2.c \
xfat2_64.c \
libft.c
SRCSOTOOL = ar.c \
init.c \
lib2.c \
libs.c \
libs2.c \
main.c \
otool.c \
x64.c \
x86.c \
xfat.c \
xfat2.c \
xfat2_64.c \
libft.c
SRCNM = ./srcs/nm/
OBJNM = $(addprefix $(SRCNM), $(SRCSNM:.c=.o))
SRCOTOOL = ./srcs/otool/
OBJOTOOL = $(addprefix $(SRCOTOOL), $(SRCSOTOOL:.c=.o))
all: $(NAME_NM) $(NAME_OTOOL)
$(NAME_NM): $(OBJNM)
@echo Compiling $(NAME_NM) ...
@$(CC) -o $(NAME_NM) $(OBJNM)
$(NAME_OTOOL): $(OBJOTOOL)
@echo Compiling $(NAME_OTOOL) ...
@$(CC) -o $(NAME_OTOOL) $(OBJOTOOL)
clean:
@rm -f $(OBJNM)
@rm -f $(OBJOTOOL)
fclean: clean
@rm -f $(NAME_NM)
@rm -f $(NAME_OTOOL)
re: fclean all
.PHONY: clean fclean all re $(NAME_NM) $(NAME_OTOOL)