xref: /illumos-gate/usr/src/test/os-tests/tests/idmap/Makefile (revision 24987e92ed84693f7d1351de150743664658894f)
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 2025 Bill Sommerfeld
14#
15
16include $(SRC)/cmd/Makefile.cmd
17include $(SRC)/test/Makefile.com
18
19PROG =	idmaptest.32 idmaptest.64
20
21SCRIPTS = idmap_init idmap_fini
22
23LDLIBS += -lidmap
24LDLIBS64 += -lidmap
25
26CSTD = $(CSTD_GNU17)
27
28ROOTOPTPKG = $(ROOT)/opt/os-tests
29TESTDIR = $(ROOTOPTPKG)/tests/idmap
30
31CMDS = $(PROG:%=$(TESTDIR)/%) \
32	$(SCRIPTS:%=$(TESTDIR)/%)
33$(CMDS) := FILEMODE = 0555
34
35all: $(PROG)
36
37install: $(CMDS)
38
39clobber: clean
40	-$(RM) $(PROG)
41
42clean:
43
44$(CMDS): $(TESTDIR) $(PROG)
45
46$(TESTDIR):
47	$(INS.dir)
48
49$(TESTDIR)/%: %
50	$(INS.file)
51
52$(TESTDIR)/%: %.ksh
53	$(INS.rename)
54
55%.64: %.c
56	$(LINK64.c) -o $@ $< $(LDLIBS64)
57	$(POST_PROCESS)
58
59%.32: %.c
60	$(LINK.c) -o $@ $< $(LDLIBS)
61	$(POST_PROCESS)
62