-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (20 loc) · 809 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
CC = gcc
CFLAGS = -std=gnu99 -Wall -Wconversion -Werror -Wextra -Wpedantic -fPIC -D_FORTIFY_SOURCE -g
LDFLAGS = -pthread
all: server
testhistory.o: testhistory.c history.h message.h tools.h
$(CC) -c $(CFLAGS) testhistory.c
history.o: history.c tools.c history.h message.h tools.h
$(CC) -c $(CFLAGS) history.c
tools.o: tools.c tools.h
$(CC) -c $(CFLAGS) tools.c
message.o: message.h
$(CC) -c $(CFLAGS) message.h
testhistory: testhistory.o history.o tools.o message.o
$(CC) $(CFLAGS) testhistory.c $(LDFLAGS) -o $@ history.o tools.o
server.o: addrpool.h message.h tools.h history.h server.c
$(CC) -c $(CFLAGS) server.c message.h addrpool.h history.h tools.h
server: server.o history.o addrpool.o tools.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ server.o history.o addrpool.o tools.o
clean:
$(RM) *.o