blob: a9d2143bb5f3205a49f6ef8c3771ad7a2fb941ff (
plain)
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
|
CC=gcc
CFLAGS=-std=c99 -Wall -g -gdwarf-2 $(shell pkg-config --cflags gobject-2.0)
LDFLAGS=-lm -lrdmacm -libverbs -lpthread $(shell pkg-config --libs gobject-2.0)
.PHONY : all
all: base
base: kiro-trb.o kiro-client.o kiro-server.o
kiro-trb.o: kiro-trb.c kiro-trb.h
$(CC) $(CFLAGS) $(LDFLAGS) -c kiro-trb.c -o kiro-trb.o
kiro-client.o: kiro-client.c kiro-client.h
$(CC) $(CFLAGS) $(LDFLAGS) -c kiro-client.c -o kiro-client.o
kiro-server.o: kiro-server.c kiro-server.h
$(CC) $(CFLAGS) $(LDFLAGS) -c kiro-server.c -o kiro-server.o
.PHONY : test
test: test-trb client server
test-trb: kiro-trb.o test.c
$(CC) $(CFLAGS) $(LDFLAGS) test.c kiro-trb.o -o test-trb
client: kiro-client.o kiro-trb.o test-client.c
$(CC) $(CFLAGS) $(LDFLAGS) test-client.c kiro-client.o kiro-trb.o -o client
server: kiro-server.o kiro-trb.o test-server.c
$(CC) $(CFLAGS) $(LDFLAGS) test-server.c kiro-server.o kiro-trb.o -o server
.PHONY : clean
clean:
rm -f *.o test-trb client server
.PHONY : rebuild
rebuild: clean all
|