-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
62 lines (45 loc) · 1.05 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
LIB=libtask.a
TCPLIBS=
ASM=asm.o
OFILES=\
$(ASM)\
channel.o\
context.o\
fd.o\
net.o\
print.o\
qlock.o\
rendez.o\
task.o\
ip.o\
all: $(LIB) echo httpload primes tcpload tcpproxy testdelay
$(OFILES): taskimpl.h task.h 386-ucontext.h power-ucontext.h ip.h
AS=gcc -c
CC=gcc
CFLAGS=-Wall -Wextra -c -I. -ggdb
#CFLAGS+=-DUSE_VALGRIND -I/usr/include/valgrind
%.o: %.S
$(AS) $*.S
%.o: %.c
$(CC) $(CFLAGS) $*.c
$(LIB): $(OFILES)
ar rvc $(LIB) $(OFILES)
echo: echo.o $(LIB)
$(CC) -o echo echo.o $(LIB)
primes: primes.o $(LIB)
$(CC) -o primes primes.o $(LIB)
tcpload: tcpload.o $(LIB)
$(CC) -o tcpload tcpload.o $(LIB)
tcpproxy: tcpproxy.o $(LIB)
$(CC) -o tcpproxy tcpproxy.o $(LIB) $(TCPLIBS)
httpload: httpload.o $(LIB)
$(CC) -o httpload httpload.o $(LIB)
testdelay: testdelay.o $(LIB)
$(CC) -o testdelay testdelay.o $(LIB)
testdelay1: testdelay1.o $(LIB)
$(CC) -o testdelay1 testdelay1.o $(LIB)
clean:
rm -f *.o echo primes tcpload tcpproxy httpload testdelay testdelay1 $(LIB)
install: $(LIB)
cp $(LIB) /usr/local/lib
cp task.h /usr/local/include