-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 878 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 878 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
#CC=mips-gcc
TestServer := testCommsServer
TestClient := testCommsClient
CFLAGS = -Wall -g
INC = -I./socket -I./crypto
all: $(TestServer) $(TestClient)
libcomms.a: comms.o crypto.o socket.o
ar rcs libcomms.a comms.o crypto.o socket.o
testCommsServer: testCommsServer.o libcomms.a
$(CC) $(CFLAGS) $(INC) testCommsServer.o libcomms.a -o testCommsServer
testCommsServer.o: testCommsServer.c
$(CC) $(CFLAGS) $(INC) -c testCommsServer.c
testCommsClient: testCommsClient.o libcomms.a
$(CC) $(CFLAGS) $(INC) testCommsClient.o libcomms.a -o testCommsClient
testCommsClient.o: testCommsClient.c
$(CC) $(CFLAGS) $(INC) -c testCommsClient.c
comms.o: comms.c
$(CC) -c $(CFLAGS) $(INC) $< -o $@
crypto.o: crypto/crypto.c
$(CC) -c $(CFLAGS) $(INC) $< -o $@
socket.o: socket/socket.c
$(CC) -c $(CFLAGS) $(INC) $< -o $@
clean:
rm -f *.o $(TestServer) $(TestClient) libcomms.a