xref: /illumos-gate/usr/src/test/os-tests/tests/ksensor/Makefile (revision 2a8bcb4efb45d99ac41c94a75c396b362c414f7f)
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 2020 Oxide Computer Company
14#
15
16PROGS = \
17	ksensor_basic \
18	ksensor_err \
19	ksensor_sread
20
21SCRIPTS = \
22	ksensor_init \
23	ksensor_fini \
24	ksensor_stress \
25	ksensor_unload
26
27PROGS32 = $(PROGS:%=%.32)
28PROGS64 = $(PROGS:%=%.64)
29
30ROOTOPTDIR = $(ROOT)/opt/os-tests/tests
31ROOTOPTKSENSOR = $(ROOTOPTDIR)/ksensor
32ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTKSENSOR)/%) \
33	$(PROGS64:%=$(ROOTOPTKSENSOR)/%) \
34	$(SCRIPTS:%=$(ROOTOPTKSENSOR)/%)
35
36include $(SRC)/cmd/Makefile.cmd
37
38.KEEP_STATE:
39
40all: $(PROGS32) $(PROGS64)
41
42install: $(ROOTOPTPROGS)
43
44clean:
45
46$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTKSENSOR)
47
48$(ROOTOPTDIR):
49	$(INS.dir)
50
51$(ROOTOPTKSENSOR): $(ROOTOPTDIR)
52	$(INS.dir)
53
54$(ROOTOPTKSENSOR)/%: %
55	$(INS.file)
56
57$(ROOTOPTKSENSOR)/%: %.ksh
58	$(INS.rename)
59
60%.64: %.c
61	$(LINK64.c) -o $@ $< $(LDLIBS64)
62	$(POST_PROCESS)
63
64%.32: %.c
65	$(LINK.c) -o $@ $< $(LDLIBS)
66	$(POST_PROCESS)
67
68clobber:
69	$(RM) $(PROGS32) $(PROGS64)
70
71FRC:
72