-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·49 lines (29 loc) · 973 Bytes
/
Makefile
File metadata and controls
executable file
·49 lines (29 loc) · 973 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
# Makefile for CPE464 tcp and udp test code
# updated by Hugh Smith - April 2023
# all target makes UDP test code
# tcpAll target makes the TCP test code
CC= gcc
CFLAGS= -g -Wall -std=gnu99
LIBS =
OBJS = networks.o srej.o pollLib.o safeUtil.o clientSlidingWindow.o serverSlidingWindow.o gethostbyname.o
#uncomment next two lines if your using sendtoErr() library
# LIBS += libcpe464.2.21.a -lstdc++ -ldl
LIBS += libcpe464.2.21.a -lstdc++ -ldl
CFLAGS += -D__LIBCPE464__
all: rcopyAll
rcopyAll: rcopy server
tcpAll: rcopy server
rcopy: rcopy.c $(OBJS)
$(CC) $(CFLAGS) -o rcopy rcopy.c $(OBJS) $(LIBS)
server: server.c $(OBJS)
$(CC) $(CFLAGS) -o server server.c $(OBJS) $(LIBS)
myClient: myClient.c $(OBJS)
$(CC) $(CFLAGS) -o myClient myClient.c $(OBJS) $(LIBS)
myServer: myServer.c $(OBJS)
$(CC) $(CFLAGS) -o myServer myServer.c $(OBJS) $(LIBS)
.c.o:
gcc -c $(CFLAGS) $< -o $@
cleano:
rm -f *.o
clean:
rm -f myServer myClient rcopy server *.o