Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / net / tcp_ao / Makefile
blob5b0205c70c3983815315048c0ec1275525b7a29a
1 # SPDX-License-Identifier: GPL-2.0
2 TEST_BOTH_AF := bench-lookups
3 TEST_BOTH_AF += connect
4 TEST_BOTH_AF += connect-deny
5 TEST_BOTH_AF += icmps-accept icmps-discard
6 TEST_BOTH_AF += key-management
7 TEST_BOTH_AF += restore
8 TEST_BOTH_AF += rst
9 TEST_BOTH_AF += self-connect
10 TEST_BOTH_AF += seq-ext
11 TEST_BOTH_AF += setsockopt-closed
12 TEST_BOTH_AF += unsigned-md5
14 TEST_IPV4_PROGS := $(TEST_BOTH_AF:%=%_ipv4)
15 TEST_IPV6_PROGS := $(TEST_BOTH_AF:%=%_ipv6)
17 TEST_GEN_PROGS := $(TEST_IPV4_PROGS) $(TEST_IPV6_PROGS)
19 top_srcdir := ../../../../..
20 include ../../lib.mk
22 HOSTAR ?= ar
24 LIBDIR := $(OUTPUT)/lib
25 LIB := $(LIBDIR)/libaotst.a
26 LDLIBS += $(LIB) -pthread
27 LIBDEPS := lib/aolib.h Makefile
29 CFLAGS += -Wall -O2 -g -fno-strict-aliasing
30 CFLAGS += $(KHDR_INCLUDES)
31 CFLAGS += -iquote ./lib/ -I ../../../../include/
33 # Library
34 LIBSRC := ftrace.c ftrace-tcp.c kconfig.c netlink.c
35 LIBSRC += proc.c repair.c setup.c sock.c utils.c
36 LIBOBJ := $(LIBSRC:%.c=$(LIBDIR)/%.o)
37 EXTRA_CLEAN += $(LIBOBJ) $(LIB)
39 $(LIB): $(LIBOBJ)
40 $(HOSTAR) rcs $@ $^
42 $(LIBDIR)/%.o: ./lib/%.c $(LIBDEPS)
43 mkdir -p $(LIBDIR)
44 $(CC) $< $(CFLAGS) $(CPPFLAGS) -o $@ -c
46 $(TEST_GEN_PROGS): $(LIB)
48 $(OUTPUT)/%_ipv4: %.c
49 $(LINK.c) $^ $(LDLIBS) -o $@
51 $(OUTPUT)/%_ipv6: %.c
52 $(LINK.c) -DIPV6_TEST $^ $(LDLIBS) -o $@
54 $(OUTPUT)/icmps-accept_ipv4: CFLAGS+= -DTEST_ICMPS_ACCEPT
55 $(OUTPUT)/icmps-accept_ipv6: CFLAGS+= -DTEST_ICMPS_ACCEPT
56 $(OUTPUT)/bench-lookups_ipv4: LDLIBS+= -lm
57 $(OUTPUT)/bench-lookups_ipv6: LDLIBS+= -lm