xref: /illumos-gate/usr/src/test/util-tests/tests/ar/Makefile (revision 0245b61fd282e95735b173b8d95be0d6688163b4)
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
20ROOTOPTPKGAR = $(ROOT)/opt/util-tests/tests/ar
21PROG = artest
22OBJS = ar_test0.o ar_test1.o
23
24ROOTPROG = $(PROG:%=$(ROOTOPTPKGAR)/%)
25ROOTOBJS = $(OBJS:%=$(ROOTOPTPKGAR)/%)
26
27$(ROOTOBJS) := FILEMODE = 0444
28
29all: $(OBJS)
30
31install: $(ROOTPROG) $(ROOTOBJS)
32
33clobber: clean
34
35clean:
36	$(RM) $(OBJS)
37
38$(ROOTOPTPKG):
39	$(INS.dir)
40
41$(ROOTOPTPKGAR): $(ROOTOPTPKG)
42	$(INS.dir)
43
44$(ROOTOPTPKGAR)/%: %.ksh $(ROOTOPTPKGAR)
45	$(INS.rename)
46
47$(ROOTOPTPKGAR)/%.o: %.o
48	$(INS.file)
49