-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (29 loc) · 883 Bytes
/
Copy pathMakefile
File metadata and controls
45 lines (29 loc) · 883 Bytes
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
CC = clang
CFLAGS = -std=c99 -c -g -Wall -Wextra -fPIC
LD = clang
LDFLAGS = -std=c99 -g -Wall -pthread -lm
all: map_test array_test bitmap_test queue.o
utils/callbacks.o: utils/callbacks.c
$(CC) $(CFLAGS) $^ -o $@
utils/list.o: utils/list.c
$(CC) $(CFLAGS) $^ -o $@
auto_array.o: auto_array.c
$(CC) $(CFLAGS) $^ -o $@
queue.o: queue.c
$(CC) $(CFLAGS) $^ -o $@
map.o: map.c
#utils/callbacks.o utils/list.o auto_array.o bitmap.o
$(CC) $(CFLAGS) $< -o $@
bitmap.o: bitmap.c
$(CC) $(CFLAGS) $< -o $@
array_test: array_test.c auto_array.o utils/callbacks.o
$(CC) $(CFLAGS) $< -o $@.o
$(LD) $(LDFLAGS) $^ -o $@
map_test: map_test.c auto_array.o utils/callbacks.o utils/list.o map.o bitmap.o
$(CC) $(CFLAGS) $< -o $@.o
$(LD) $(LDFLAGS) -lm $^ -o $@
bitmap_test: bitmap_test.c bitmap.o
$(LD) $(LDFLAGS) $^ -o $@
clean:
rm -f *.o *.a
rm -f utils/*.o utils/*.a