-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (34 loc) · 897 Bytes
/
Makefile
File metadata and controls
48 lines (34 loc) · 897 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
46
47
48
CC=gcc -g
CFLAGS=-Wall -Wextra
LOAD=load_balancer
SERVER=server
CACHE=lru_cache
UTILS=utils
QUEUE=queue
LINKED_LIST=linked_list
HASH_TABLE=hash_table
# Add new source file names here:
# EXTRA=<extra source file name>
.PHONY: build clean
build: tema2
tema2: main.o $(LOAD).o $(SERVER).o $(CACHE).o $(UTILS).o $(QUEUE).o $(LINKED_LIST).o $(HASH_TABLE).o
$(CC) $^ -o $@
main.o: main.c
$(CC) $(CFLAGS) $^ -c
$(LOAD).o: $(LOAD).c $(LOAD).h
$(CC) $(CFLAGS) $^ -c
$(SERVER).o: $(SERVER).c $(SERVER).h
$(CC) $(CFLAGS) $^ -c
$(CACHE).o: $(CACHE).c $(CACHE).h
$(CC) $(CFLAGS) $^ -c
$(UTILS).o: $(UTILS).c $(UTILS).h
$(CC) $(CFLAGS) $^ -c
# $(EXTRA).o: $(EXTRA).c $(EXTRA).h
# $(CC) $(CFLAGS) $^ -c
run_debug: build valgrind clean
valgrind:
valgrind --leak-check=full --show-leak-kinds=all ./tema2
clean:
rm -f *.o tema2 *.h.gch
pack:
zip distributed_db.zip *.c *.h README* Makefile