xref: /illumos-gate/usr/src/test/util-tests/tests/pcieadm/Makefile (revision dd72704bd9e794056c558153663c739e2012d721)
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 2021 Oxide Computer Company
14#
15
16include $(SRC)/cmd/Makefile.cmd
17include $(SRC)/test/Makefile.com
18
19ROOTOPTPKG = $(ROOT)/opt/util-tests/tests
20ROOTOPTPCI = $(ROOT)/opt/util-tests/tests/pci
21PROG = pcieadmtest pcieadm-priv
22DATAFILES = bridge.pci igb.pci \
23	header0-basic.out \
24	header0-basic-L.out \
25	header0-basic-LH.out \
26	header0-basic-n.out \
27	header0-parse.out \
28	igb-ltr.out \
29	igb-ltr-p.out \
30	bridge-ht.out \
31	bridge-ht-p.out \
32	bridge-ht.msi-p.out \
33	bridge-ht.msi.command-p.out \
34	bridge-efilt.out \
35	bridge-efilt-p.out
36
37ROOTPROG = $(PROG:%=$(ROOTOPTPKG)/%)
38ROOTDATA = $(DATAFILES:%=$(ROOTOPTPCI)/%)
39$(ROOTDATA) := FILEMODE = 0444
40
41all:
42
43install: $(ROOTDATA) $(ROOTPROG)
44
45clobber: clean
46
47clean:
48
49$(ROOTOPTPKG):
50	$(INS.dir)
51
52$(ROOTOPTPCI): $(ROOTOPTPKG)
53	$(INS.dir)
54
55$(ROOTOPTPCI)/%: % $(ROOTOPTPCI)
56	$(INS.file)
57
58$(ROOTOPTPKG)/%: %.ksh $(ROOTOPTPKG)
59	$(INS.rename)
60