Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# Makefile for net selftests
2
3CC = $(CROSS_COMPILE)gcc
4CFLAGS = -Wall -O2 -g
5
6CFLAGS += -I../../../../usr/include/
7
8NET_PROGS = socket psock_fanout psock_tpacket
9
10all: $(NET_PROGS)
11%: %.c
12 $(CC) $(CFLAGS) -o $@ $^
13
14run_tests: all
15 @/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]"
16 @/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]"
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
24clean:
25 $(RM) $(NET_PROGS)