-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (39 loc) · 1.11 KB
/
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
49
50
51
52
53
CC=gcc
CFLAGS=-Wall -Wextra # -Werror
DEPS = network.h
SERVER_OBJ = server.o network.o
CLIENT_OBJ = client.o network.o
LISTENER_OBJ = listener.o network.o
TALKER_OBJ = talker.o network.o
SHOWIP_OBJ = showip.o
POLL_OBJ = poll.o
POLLSERVER_OBJ = pollserver.o network.o
SELECT_OBJ = select.o
SELECTSERVER_OBJ = selectserver.o network.o
BROADCASTER_OBJ = broadcaster.o
all: server client showip listener talker poll pollserver select selectserver broadcaster
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
server: $(SERVER_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
client: $(CLIENT_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
showip: $(SHOWIP_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
listener: $(LISTENER_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
talker: $(TALKER_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
poll: $(POLL_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
pollserver: $(POLLSERVER_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
select: $(SELECT_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
selectserver: $(SELECTSERVER_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
broadcaster: $(BROADCASTER_OBJ)
$(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
clean:
rm server client showip listener talker poll pollserver select selectserver broadcaster *.o