-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 2.92 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
# ░██████╗██╗███╗░░██╗░██████╗░██╗░░░░░██╗░░░██╗░░░░░░
# ██╔════╝██║████╗░██║██╔════╝░██║░░░░░╚██╗░██╔╝░░░░░░
# ╚█████╗░██║██╔██╗██║██║░░██╗░██║░░░░░░╚████╔╝░█████╗
# ░╚═══██╗██║██║╚████║██║░░╚██╗██║░░░░░░░╚██╔╝░░╚════╝
# ██████╔╝██║██║░╚███║╚██████╔╝███████╗░░░██║░░░░░░░░░
# ╚═════╝░╚═╝╚═╝░░╚══╝░╚═════╝░╚══════╝░░░╚═╝░░░░░░░░░
# ██╗░░░░░██╗███╗░░██╗██╗░░██╗███████╗██████╗░░░░░░░██╗░░░░░██╗░██████╗████████╗
# ██║░░░░░██║████╗░██║██║░██╔╝██╔════╝██╔══██╗░░░░░░██║░░░░░██║██╔════╝╚══██╔══╝
# ██║░░░░░██║██╔██╗██║█████═╝░█████╗░░██║░░██║█████╗██║░░░░░██║╚█████╗░░░░██║░░░
# ██║░░░░░██║██║╚████║██╔═██╗░██╔══╝░░██║░░██║╚════╝██║░░░░░██║░╚═══██╗░░░██║░░░
# ███████╗██║██║░╚███║██║░╚██╗███████╗██████╔╝░░░░░░███████╗██║██████╔╝░░░██║░░░
# ╚══════╝╚═╝╚═╝░░╚══╝╚═╝░░╚═╝╚══════╝╚═════╝░░░░░░░╚══════╝╚═╝╚═════╝░░░░╚═╝░░░
# Author: Hiro (ihiiro)
# Email: [email protected]
# License: MIT
# Start: 2023
# Update: 2023
CFILES = srcs/traversers.c srcs/non_traversers.c
CC = cc
CFLAGS = -Wall -Wextra -Werror
OFILES = ${CFILES:.c=.o}
LIB = sll.a
TESTS = tests
BENCHMARKS = bm
.PHONY: all clean fclean re
all: ${LIB} ${TESTS} ${BENCHMARKS}
${LIB}: ${OFILES}
ar rcs $@ $^
%.o: %.c
${CC} ${CFLAGS} -c $< -o $@
${TESTS}: ${LIB}
${CC} ${CFLAGS} srcs/tests.c $< -o $@
${BENCHMARKS}: ${LIB}
${CC} ${CFLAGS} srcs/benchmarks.c $< -o $@
clean:
rm ${OFILES}
fclean: clean
rm ${LIB}
rm ${TESTS}
rm ${BENCHMARKS}
re: fclean all