-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (85 loc) · 1.56 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
NAME = libmx.a
INC = inc/libmx.h
SRCR = mx_atoi.c \
mx_binary_search.c \
mx_bubble_sort.c \
mx_bufsize_chars_read.c \
mx_clear_list.c \
mx_count_substr.c \
mx_count_words.c \
mx_create_node.c \
mx_del_extra_spaces.c \
mx_del_strarr.c \
mx_file_to_str.c \
mx_foreach.c \
mx_get_char_index.c \
mx_get_substr_index.c \
mx_hex_to_nbr.c \
mx_is_substr.c \
mx_isalpha.c \
mx_isdigit.c \
mx_isspace.c \
mx_itoa.c \
mx_list_size.c \
mx_memccpy.c \
mx_memchr.c \
mx_memcmp.c \
mx_memcpy.c \
mx_memmem.c \
mx_memmove.c \
mx_memrchr.c \
mx_memset.c \
mx_nbr_to_hex.c \
mx_pop_back.c \
mx_pop_front.c \
mx_pow.c \
mx_print_strarr.c \
mx_print_unicode.c \
mx_printchar.c \
mx_printerror.c \
mx_printint.c \
mx_printstr.c \
mx_push_back.c \
mx_push_front.c \
mx_quicksort.c \
mx_read_line.c \
mx_realloc.c \
mx_replace_substr.c \
mx_skip_untilchar.c \
mx_skip_untilchar_ncount.c \
mx_skipchar.c \
mx_sort_list.c \
mx_sqrt.c \
mx_str_reverse.c \
mx_strcat.c \
mx_strcmp.c \
mx_strcpy.c \
mx_strdel.c \
mx_strdup.c \
mx_strjoin.c \
mx_strlen.c \
mx_strlen_size_t.c \
mx_strncpy.c \
mx_strndup.c \
mx_strnew.c \
mx_strsplit.c \
mx_strsplit_ncount.c \
mx_strstr.c \
mx_strtrim.c \
mx_swap_char.c \
mx_write_str_list.c \
SRC = $(addprefix src/, $(SRCR))
OBJR = $(SRCR:.c=.o)
OBJ = $(addprefix obj/, $(OBJR))
FLAGS = -std=c11 -Wall -Wextra -Werror -Wpedantic
all:
@mkdir obj
@clang $(FLAGS) -c $(SRC)
@mv $(OBJR) obj
@ar -rcs $(NAME) $(OBJ)
install: all
uninstall: clean
@rm -rf $(NAME)
clean:
@rm -rf ./obj
reinstall: uninstall install