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 13 14 TEST_IPV4_PROGS := $(TEST_BOTH_AF:%=%_ipv4) 15 TEST_IPV6_PROGS := $(TEST_BOTH_AF:%=%_ipv6) 16 17 TEST_GEN_PROGS := $(TEST_IPV4_PROGS) $(TEST_IPV6_PROGS) 18 19 top_srcdir := ../../../../.. 20 include ../../lib.mk 21 22 HOSTAR ?= ar 23 24 LIBDIR := $(OUTPUT)/lib 25 LIB := $(LIBDIR)/libaotst.a 26 LDLIBS += $(LIB) -pthread 27 LIBDEPS := lib/aolib.h Makefile 28 29 CFLAGS += -Wall -O2 -g -fno-strict-aliasing 30 CFLAGS += $(KHDR_INCLUDES) 31 CFLAGS += -iquote ./lib/ -I ../../../../include/ 32 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) 38 39 $(LIB): $(LIBOBJ) 40 $(HOSTAR) rcs $@ $^ 41 42 $(LIBDIR)/%.o: ./lib/%.c $(LIBDEPS) 43 mkdir -p $(LIBDIR) 44 $(CC) $< $(CFLAGS) $(CPPFLAGS) -o $@ -c 45 46 $(TEST_GEN_PROGS): $(LIB) 47 48 $(OUTPUT)/%_ipv4: %.c 49 $(LINK.c) $^ $(LDLIBS) -o $@ 50 51 $(OUTPUT)/%_ipv6: %.c 52 $(LINK.c) -DIPV6_TEST $^ $(LDLIBS) -o $@ 53 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
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.