-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (58 loc) · 1.05 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
NAME = uls
INC = inc/uls.h
SRCR = acc_stat_cmp.c \
birth_size_cmp.c \
color.c \
display1.c \
fts.c \
fts_children.c \
main.c \
mx_bBcClqtTuUvwx1.c \
mx_display.c \
mx_getopt.c \
mx_parse_flags.c \
mx_printcol.c \
mx_printlong.c \
mx_printsize.c \
mx_printtime.c \
mx_printtype.c \
mx_sort_fts_chlist.c \
mx_traverse.c \
name_mod_str_cmp.c \
nonprintables.c \
print.c \
util.c \
util1.c \
util2.c \
util3.c \
util4.c \
util5.c \
util6.c \
util7.c \
util8.c \
SRC = $(addprefix src/, $(SRCR))
OBJR = $(SRCR:.c=.o)
OBJ = $(addprefix obj/, $(OBJR))
FLAGS = -std=c11 -Wall -Wextra -Werror -Wpedantic
LIB = libmx/libmx.a
all: install
install: clean
@make -C libmx
@mkdir obj
@clang $(FLAGS) -c $(SRC)
@mv $(OBJR) obj
@clang $(FLAGS) $(OBJ) $(LIB) -o $(NAME)
@make clean
uninstall: clean
@rm -rf $(NAME)
@make uninstall -C libmx/
clean:
@rm -rf uls.dSYM
@rm -rf $(OBJR)
@rm -rf obj/
@make clean -C libmx/
reinstall: uninstall install
debug: uninstall
@make -C libmx
@cp $(LIB) .
@clang $(FLAGS) $(LIB) $(SRC) -o $(NAME) --debug