-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.in
105 lines (84 loc) · 2.05 KB
/
Makefile.in
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
CC = @CC@
DEFS = @DEFS@
CFLAGS = @CFLAGS@ $(DEFS) -I@srcdir@ -I.
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
EXE = @EXEEXT@
SHELL = /bin/sh
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
mandir = @mandir@/man1
RM = @RM@
INSTALL = @INSTALL@
TARGET = mbuffer$(EXE)
SOURCES = log.c network.c mbuffer.c
OBJECTS = $(SOURCES:.c=.o)
TESTTREE = /opt/csw/gcc4
.PHONY: clean all distclean install check testcleanup
all: $(TARGET)
$(OBJECTS): config.h Makefile
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
clean:
-$(RM) $(OBJECTS)
distclean: clean
-$(RM) $(TARGET) config.h config.log \
config.status Makefile mbuffer.1 core
install: $(TARGET)
-$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
-$(INSTALL) -d $(DESTDIR)$(mandir)
$(INSTALL) mbuffer.1 $(DESTDIR)$(mandir)
lint:
lint $(DEFS) $(SOURCES)
check: $(TARGET) test0 test1 test2 test3 testcleanup
testcleanup:
rm -f test0 test1 test2 test3 test0.md5 test1.md5 test2.md5 test3.md5 \
test.tar test.md5
test.tar:
tar cf test.tar $(TESTTREE)
test.md5: test.tar
openssl md5 < test.tar > test.md5
test0: test.md5
./mbuffer -i test.tar -p10 | ./mbuffer -q -P 90 | openssl md5 > test0.md5
sync
diff test0.md5 test.md5
touch test0
test1: test.md5
./mbuffer -i test.tar -f -o [email protected] -o /dev/null -H
openssl md5 < [email protected] > [email protected]
rm -f [email protected]
sync
diff [email protected] test.md5
touch $@
test2: test.md5
./mbuffer -q -I :8000 -o [email protected] -o - | openssl md5 > [email protected] & \
sleep 1; \
rm -f [email protected]; \
./mbuffer -i test.tar -o /dev/null -O localhost:8000 -H; \
wait
sync
diff [email protected] test.md5
openssl md5 < [email protected] > [email protected]
rm -f [email protected]
sync
diff [email protected] test.md5
touch $@
test3: test.md5
./mbuffer -q -6 -I :8000 | openssl md5 > [email protected] & \
sleep 1; \
rm -f [email protected]; \
./mbuffer -i test.tar -o /dev/null -6 -O localhost:8000 -o [email protected] -H; \
wait
sync
diff [email protected] test.md5
openssl md5 < [email protected] > [email protected]
rm -f [email protected]
sync
diff [email protected] test.md5
touch $@