-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (33 loc) · 844 Bytes
/
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
CC = clang
CFLAGS = -Wall -Wextra -Werror -Wpedantic
LFLAGS = pkg-config
all: encode decode
encode: encode.o huffman.o io.o pq.o node.o code.o stack.o
$(CC) -o encode encode.o huffman.o io.o pq.o node.o code.o stack.o
decode: decode.o huffman.o io.o node.o code.o stack.o pq.o
$(CC) -o decode decode.o huffman.o io.o node.o code.o stack.o pq.o
encode.o: encode.c
$(CC) $(CFLAGS) -c encode.c
node.o: node.c
$(CC) $(CFLAGS) -c node.c
pq.o: pq.c
$(CC) $(CFLAGS) -c pq.c
code.o: code.c
$(CC) $(CFLAGS) -c code.c
stack.o: stack.c
$(CC) $(CFLAGS) -c stack.c
io.o: io.c
$(CC) $(CFLAGS) -c io.c
huffman.o: huffman.c
$(CC) $(CFLAGS) -c huffman.c
clean:
rm -f pq.o
rm -f node.o
rm -f code.o
rm -f stack.o
rm -f io.o
rm -f huffman.o
rm -f encode.o encode
rm -f decode.o decode
format:
clang-format -i -style=file *.[c,h]