1# 2# This file and its contents are supplied under the terms of the 3# Common Development and Distribution License ("CDDL"), version 1.0. 4# You may only use this file in accordance with the terms of version 5# 1.0 of the CDDL. 6# 7# A full copy of the text of the CDDL should have accompanied this 8# source. A copy of the CDDL is also available via the Internet at 9# http://www.illumos.org/license/CDDL. 10# 11 12# 13# Copyright 2025 Oxide Computer Company 14# 15 16include $(SRC)/Makefile.master 17 18ROOTOPTPKG = $(ROOT)/opt/os-tests 19TESTDIR = $(ROOTOPTPKG)/tests/mac 20DATADIR = $(TESTDIR)/data 21 22PROGS = \ 23 mac_cksum \ 24 mac_parsing 25 26SCRIPTS = mac_ktest 27 28DATAFILES = \ 29 ipv4_bad_proto.snoop \ 30 ipv4_icmp.snoop \ 31 ipv4_sctp.snoop \ 32 ipv4_tcp.snoop \ 33 ipv4_udp.snoop \ 34 ipv6_icmp.snoop \ 35 ipv6_sctp.snoop \ 36 ipv6_tcp.snoop \ 37 ipv6_udp.snoop \ 38 ipv6_eh_udp.snoop 39 40include $(SRC)/cmd/Makefile.cmd 41include $(SRC)/cmd/Makefile.cmd.64 42include $(SRC)/cmd/Makefile.ctf 43include $(SRC)/test/Makefile.com 44 45CTF_MODE = link 46LDLIBS += -lktest -lnvpair 47CSTD= $(CSTD_GNU17) 48 49CMDS = $(PROGS:%=$(TESTDIR)/%) \ 50 $(SCRIPTS:%=$(TESTDIR)/%) 51TESTDATA = $(DATAFILES:%=$(DATADIR)/%) 52 53$(CMDS) := FILEMODE = 0555 54$(SCRIPTS) := FILEMODE = 0555 55$(TESTDATA) := FILEMODE = 0444 56 57all: $(PROGS) 58 59install: all $(CMDS) $(TESTDATA) 60 61lint: 62 63clobber: clean 64 -$(RM) $(PROGS) 65 66clean: 67 68$(CMDS): $(TESTDIR) $(PROGS) 69 70$(TESTDIR): 71 $(INS.dir) 72$(DATADIR): $(TESTDIR) 73 $(INS.dir) 74 75$(TESTDATA): $(DATADIR) 76 77$(TESTDIR)/%: % 78 $(INS.file) 79 80$(TESTDIR)/%: %.ksh 81 $(INS.rename) 82