libtask/Makefile

63 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2009-10-11 00:04:03 +04:00
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\
2012-08-01 06:00:00 +04:00
ip.o\
2009-10-11 00:04:03 +04:00
2014-08-03 20:59:15 +04:00
all: $(LIB) echo httpload primes tcpload tcpproxy testdelay
2009-10-11 00:04:03 +04:00
2012-08-01 06:00:00 +04:00
$(OFILES): taskimpl.h task.h 386-ucontext.h power-ucontext.h ip.h
2009-10-11 00:04:03 +04:00
AS=gcc -c
CC=gcc
CFLAGS=-Wall -Wextra -c -I. -ggdb
2014-08-03 20:40:18 +04:00
#CFLAGS+=-DUSE_VALGRIND -I/usr/include/valgrind
2009-10-11 00:04:03 +04:00
%.o: %.S
$(AS) $*.S
%.o: %.c
$(CC) $(CFLAGS) $*.c
$(LIB): $(OFILES)
ar rvc $(LIB) $(OFILES)
2014-08-03 20:59:15 +04:00
echo: echo.o $(LIB)
$(CC) -o echo echo.o $(LIB)
2009-10-11 00:04:03 +04:00
primes: primes.o $(LIB)
$(CC) -o primes primes.o $(LIB)
2014-08-03 20:59:15 +04:00
tcpload: tcpload.o $(LIB)
$(CC) -o tcpload tcpload.o $(LIB)
2009-10-11 00:04:03 +04:00
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:
2014-08-03 20:59:15 +04:00
rm -f *.o echo primes tcpload tcpproxy httpload testdelay testdelay1 $(LIB)
2009-10-11 00:04:03 +04:00
install: $(LIB)
cp $(LIB) /usr/local/lib
cp task.h /usr/local/include