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 2018 Joyent, Inc.
14 #
15
16 include $(SRC)/Makefile.master
17
18 ROOTOPTPKG = $(ROOT)/opt/util-tests
19 TESTDIR = $(ROOTOPTPKG)/tests/dis
20 ARCHS = i386 risc-v risc-v-c sparc
21
22 PROG = distest
23
24 I386_FILES :sh= (cd i386; print *)
25 RISCV_FILES :sh= (cd risc-v; print *)
26 RISCV_C_FILES :sh= (cd risc-v-c; print *)
27 SPARC_FILES :sh= (cd sparc; print *)
28
29 ROOTFILES = \
30 $(I386_FILES:%=$(TESTDIR)/i386/%) \
31 $(RISCV_FILES:%=$(TESTDIR)/risc-v/%) \
32 $(RISCV_C_FILES:%=$(TESTDIR)/risc-v-c/%) \
33 $(SPARC_FILES:%=$(TESTDIR)/sparc/%)
34
35 include $(SRC)/cmd/Makefile.cmd
36 include $(SRC)/test/Makefile.com
37
38 ARCHDIRS = $(ARCHS:%=$(TESTDIR)/%)
39 CMDS = $(PROG:%=$(TESTDIR)/%)
40 $(CMDS) := FILEMODE = 0555
41
42 install: $(CMDS) $(ROOTFILES)
43
44 lint:
45
46 clobber: clean
47
48 clean:
49
50 $(CMDS) $(ROOTFILES): $(TESTDIR) $(ARCHDIRS)
51
52 $(TESTDIR) $(ARCHDIRS):
53 $(INS.dir)
54
55 $(TESTDIR)/%: %
56 $(INS.file)
57
58 $(TESTDIR)/%: %.ksh
59 $(INS.rename)