-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
174 lines (164 loc) · 4.21 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#CC = clang-11.0
CC = gcc
CFLAGS = -Wall -Wextra -pedantic -std=c99 -Warray-parameter=0 -s -O2
TFLAGS = -Wall -Wextra -pedantic -std=c99 -Warray-parameter=0 -g -O2
# -fsanitize=undefined
LIB_NAME = harbol
SRCS = str/str.c
SRCS += array/array.c
SRCS += tuple/tuple.c
SRCS += bytebuffer/bytebuffer.c
SRCS += map/map.c
SRCS += allocators/mempool/mempool.c
SRCS += allocators/objpool/objpool.c
SRCS += allocators/region/region.c
SRCS += allocators/bistack/bistack.c
SRCS += tree/tree.c
SRCS += variant/variant.c
SRCS += cfg/cfg.c
SRCS += plugins/plugins.c
SRCS += deque/deque.c
SRCS += lex/lex.c
SRCS += msg_sys/msg_sys.c
SRCS += msg_span/msg_span.c
SRCS += math/math_parser.c
OBJS = $(SRCS:.c=.o)
harbol_static:
+$(MAKE) -C str
+$(MAKE) -C array
+$(MAKE) -C tuple
+$(MAKE) -C bytebuffer
+$(MAKE) -C map
+$(MAKE) -C allocators/mempool
+$(MAKE) -C allocators/objpool
+$(MAKE) -C allocators/region
+$(MAKE) -C allocators/bistack
+$(MAKE) -C tree
+$(MAKE) -C variant
+$(MAKE) -C cfg
+$(MAKE) -C plugins
+$(MAKE) -C deque
+$(MAKE) -C lex
+$(MAKE) -C msg_sys
+$(MAKE) -C msg_span
+$(MAKE) -C math
ar cr lib$(LIB_NAME).a $(OBJS)
harbol_shared:
+$(MAKE) -C str
+$(MAKE) -C array
+$(MAKE) -C tuple
+$(MAKE) -C bytebuffer
+$(MAKE) -C map
+$(MAKE) -C allocators/mempool
+$(MAKE) -C allocators/objpool
+$(MAKE) -C allocators/region
+$(MAKE) -C allocators/bistack
+$(MAKE) -C tree
+$(MAKE) -C variant
+$(MAKE) -C cfg
+$(MAKE) -C plugins
+$(MAKE) -C deque
+$(MAKE) -C lex
+$(MAKE) -C msg_sys
+$(MAKE) -C msg_span
+$(MAKE) -C math
$(CC) -shared -o lib$(LIB_NAME).so $(OBJS)
test:
+$(MAKE) -C str test
+$(MAKE) -C array test
+$(MAKE) -C tuple test
+$(MAKE) -C bytebuffer test
+$(MAKE) -C map test
+$(MAKE) -C allocators/mempool test
+$(MAKE) -C allocators/objpool test
+$(MAKE) -C allocators/region test
+$(MAKE) -C allocators/bistack test
+$(MAKE) -C tree test
+$(MAKE) -C variant test
+$(MAKE) -C cfg test
+$(MAKE) -C plugins test
+$(MAKE) -C deque test
+$(MAKE) -C lex test
+$(MAKE) -C msg_sys test
+$(MAKE) -C msg_span test
+$(MAKE) -C math test
debug:
+$(MAKE) -C str debug
+$(MAKE) -C array debug
+$(MAKE) -C tuple debug
+$(MAKE) -C bytebuffer debug
+$(MAKE) -C map debug
+$(MAKE) -C allocators/mempool debug
+$(MAKE) -C allocators/objpool debug
+$(MAKE) -C allocators/region debug
+$(MAKE) -C allocators/bistack debug
+$(MAKE) -C tree debug
+$(MAKE) -C variant debug
+$(MAKE) -C cfg debug
+$(MAKE) -C plugins debug
+$(MAKE) -C deque debug
+$(MAKE) -C lex debug
+$(MAKE) -C msg_sys debug
+$(MAKE) -C msg_span debug
+$(MAKE) -C math debug
ar cr lib$(LIB_NAME).a $(OBJS)
debug_shared:
+$(MAKE) -C str debug
+$(MAKE) -C array debug
+$(MAKE) -C tuple debug
+$(MAKE) -C bytebuffer debug
+$(MAKE) -C map debug
+$(MAKE) -C allocators/mempool debug
+$(MAKE) -C allocators/objpool debug
+$(MAKE) -C allocators/region debug
+$(MAKE) -C allocators/bistack debug
+$(MAKE) -C tree debug
+$(MAKE) -C variant debug
+$(MAKE) -C cfg debug
+$(MAKE) -C plugins debug
+$(MAKE) -C deque debug
+$(MAKE) -C lex debug
+$(MAKE) -C msg_sys debug
+$(MAKE) -C msg_span debug
+$(MAKE) -C math debug
$(CC) -shared -o lib$(LIB_NAME).so $(OBJS)
clean:
+$(MAKE) -C str clean
+$(MAKE) -C array clean
+$(MAKE) -C tuple clean
+$(MAKE) -C bytebuffer clean
+$(MAKE) -C map clean
+$(MAKE) -C allocators/mempool clean
+$(MAKE) -C allocators/objpool clean
+$(MAKE) -C allocators/region clean
+$(MAKE) -C allocators/bistack clean
+$(MAKE) -C tree clean
+$(MAKE) -C variant clean
+$(MAKE) -C cfg clean
+$(MAKE) -C plugins clean
+$(MAKE) -C deque clean
+$(MAKE) -C lex clean
+$(MAKE) -C msg_sys clean
+$(MAKE) -C msg_span clean
+$(MAKE) -C math clean
$(RM) *.o
run_test:
+$(MAKE) -C str run_test
+$(MAKE) -C array run_test
+$(MAKE) -C tuple run_test
+$(MAKE) -C bytebuffer run_test
+$(MAKE) -C map run_test
+$(MAKE) -C allocators/mempool run_test
+$(MAKE) -C allocators/objpool run_test
+$(MAKE) -C allocators/region run_test
+$(MAKE) -C allocators/bistack run_test
+$(MAKE) -C tree run_test
+$(MAKE) -C variant run_test
+$(MAKE) -C cfg run_test
+$(MAKE) -C plugins run_test
+$(MAKE) -C deque run_test
+$(MAKE) -C lex run_test
+$(MAKE) -C msg_sys run_test
+$(MAKE) -C msg_span run_test
+$(MAKE) -C math run_test
$(RM) *.o