-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 801 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
CC=gcc
CFLAGS=-Wall -Wextra
LOAD=load_balancer
SERVER=server
CACHE=lru_cache
UTILS=utils
HASH=hash
QUEUE=queue
# 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 $(HASH).o $(QUEUE).o # $(EXTRA).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
$(HASH).o: $(HASH).c $(HASH).h
$(CC) $(CFLAGS) $^ -c
$(QUEUE).o: $(QUEUE).c $(QUEUE).h
$(CC) $(CFLAGS) $^ -c
# $(EXTRA).o: $(EXTRA).c $(EXTRA).h
# $(CC) $(CFLAGS) $^ -c
clean:
rm -f *.o tema2 *.h.gch