xref: /illumos-gate/usr/src/test/util-tests/tests/mdb/progs/Makefile (revision 7a58f53801acca2cd594b9ecb75bf926e4fb3eda)
1f32691c9SRobert Mustacchi#
2f32691c9SRobert Mustacchi# This file and its contents are supplied under the terms of the
3f32691c9SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
4f32691c9SRobert Mustacchi# You may only use this file in accordance with the terms of version
5f32691c9SRobert Mustacchi# 1.0 of the CDDL.
6f32691c9SRobert Mustacchi#
7f32691c9SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
8f32691c9SRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
9f32691c9SRobert Mustacchi# http://www.illumos.org/license/CDDL.
10f32691c9SRobert Mustacchi#
11f32691c9SRobert Mustacchi
12f32691c9SRobert Mustacchi#
13f32691c9SRobert Mustacchi# Copyright 2021 Oxide Computer Company
14f32691c9SRobert Mustacchi#
15f32691c9SRobert Mustacchi
16f32691c9SRobert Mustacchiinclude $(SRC)/Makefile.master
17f32691c9SRobert Mustacchi
18f32691c9SRobert MustacchiROOTOPTPKG = $(ROOT)/opt/util-tests
19f32691c9SRobert MustacchiTESTDIR = $(ROOTOPTPKG)/tests/mdb/progs
20*7a58f538SRobert MustacchiPROGS = number_symbol bitfields
21f32691c9SRobert Mustacchi
22f32691c9SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd
23*7a58f538SRobert Mustacchiinclude $(SRC)/cmd/Makefile.ctf
24f32691c9SRobert Mustacchiinclude $(SRC)/test/Makefile.com
25f32691c9SRobert Mustacchi
26*7a58f538SRobert MustacchiCTF_MODE = link
27*7a58f538SRobert Mustacchi
28f32691c9SRobert MustacchiCMDS = $(PROGS:%=$(TESTDIR)/%)
29f32691c9SRobert Mustacchi$(CMDS) := FILEMODE = 0555
30f32691c9SRobert Mustacchi
31f32691c9SRobert Mustacchiall: $(PROGS)
32f32691c9SRobert Mustacchi
33f32691c9SRobert Mustacchiinstall: all $(CMDS) $(OUTFILES)
34f32691c9SRobert Mustacchi
35f32691c9SRobert Mustacchiclobber: clean
36f32691c9SRobert Mustacchi	-$(RM) $(PROGS)
37f32691c9SRobert Mustacchi
38f32691c9SRobert Mustacchiclean:
39f32691c9SRobert Mustacchi
40f32691c9SRobert Mustacchi$(CMDS): $(TESTDIR) $(PROG)
41f32691c9SRobert Mustacchi
42f32691c9SRobert Mustacchi$(TESTDIR):
43f32691c9SRobert Mustacchi	$(INS.dir)
44f32691c9SRobert Mustacchi
45f32691c9SRobert Mustacchi$(TESTDIR)/%: %
46f32691c9SRobert Mustacchi	$(INS.file)
47f32691c9SRobert Mustacchi
48f32691c9SRobert Mustacchi%: %.c
49f32691c9SRobert Mustacchi	$(LINK.c) -o $@ $< $(LDLIBS)
50f32691c9SRobert Mustacchi	$(POST_PROCESS)
51