-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
72 lines (47 loc) · 1.35 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
CPP = g++
CC = gcc
CFLAGS = -lncurses -pthread
objects_client = comm.o client.o screen.o logging.o helpers.o
objects_clientb = icp.o state.o help.o clientb.o
objects_server = comm.o sensormsg.o server.o logging.o helpers.o
objects_serverb = icp.o state.o help.o serverb.o list.o
objects = comm.o icp.o state.o client.o server.o helpers.o sensormsg.o screen.o serverb.o clientb.o list.o logging.o help.o
PROGS = server client serverb clientb
all:$(PROGS)
server:$(objects_server)
$(CPP) -o server $(objects_server) $(CFLAGS)
client:$(objects_client)
$(CPP) -o client $(objects_client) $(CFLAGS)
serverb:$(objects_serverb)
$(CC) -o serverb $(objects_serverb) $(CFLAGS)
clientb:$(objects_clientb)
$(CC) -o clientb $(objects_clientb) $(CFLAGS)
serverb.o:serverb.c
$(CC) -c $^ $(CFLAGS)
server.o:server.cc
$(CPP) -c $^ $(CFLAGS)
client.o:client.cc
$(CPP) -c $^ $(CFLAGS)
clientb.o:clientb.c
$(CC) -c $^ $(CFLAGS)
comm.o:comm.cc
$(CPP) -c $^ $(CFLAGS)
logging.o:logging.cc
$(CPP) -c $^ $(CFLAGS)
icp.o:icp.c
$(CC) -c $^ $(CFLAGS)
state.o:state.c
$(CC) -c $^ $(CFLAGS)
help.o:help.c
$(CC) -c $^ $(CFLAGS)
list.o:list.c
$(CC) -c $^ $(CFLAGS)
helpers.o:helpers.cc
$(CPP) -c $^ $(CFLAGS)
sensormsg.o:sensormsg.cc
$(CPP) -c $^ $(CFLAGS)
screen.o:screen.cc
$(CPP) -c $^ $(CFLAGS)
.PHONY :clean
clean:
rm server serverb client clientb $(objects)