Commit | Line | Data |
---|---|---|
a6f68034 | 1 | # Makefile for net selftests |
77f65ebd WB |
2 | |
3 | CC = $(CROSS_COMPILE)gcc | |
23a95442 | 4 | CFLAGS = -Wall -O2 -g |
77f65ebd WB |
5 | |
6 | CFLAGS += -I../../../../usr/include/ | |
7 | ||
23a95442 | 8 | NET_PROGS = socket psock_fanout psock_tpacket |
77f65ebd | 9 | |
a6f68034 | 10 | all: $(NET_PROGS) |
77f65ebd WB |
11 | %: %.c |
12 | $(CC) $(CFLAGS) -o $@ $^ | |
13 | ||
14 | run_tests: all | |
a6f68034 | 15 | @/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]" |
77f65ebd | 16 | @/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]" |
64a8946b AS |
17 | @if /sbin/modprobe test_bpf ; then \ |
18 | /sbin/rmmod test_bpf; \ | |
19 | echo "test_bpf: ok"; \ | |
20 | else \ | |
21 | echo "test_bpf: [FAIL]"; \ | |
22 | exit 1; \ | |
23 | fi | |
77f65ebd | 24 | clean: |
a6f68034 | 25 | $(RM) $(NET_PROGS) |