xref: /illumos-gate/usr/src/test/os-tests/tests/syscall/Makefile (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
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 Joyent, Inc.
14#
15
16include $(SRC)/cmd/Makefile.cmd
17include $(SRC)/test/Makefile.com
18
19PROGS = fchmodat open
20
21CSTD = $(CSTD_GNU99)
22
23ROOTOPTPKG = $(ROOT)/opt/os-tests
24TESTDIR = $(ROOTOPTPKG)/tests/syscall
25
26PROGS32 = $(PROGS:%=%.32)
27PROGS64 = $(PROGS:%=%.64)
28CMDS = $(PROGS32) $(PROGS64)
29$(CMDS) := FILEMODE = 0555
30
31TESTDIRPROGS = $(PROGS32:%=$(TESTDIR)/%) \
32	$(PROGS64:%=$(TESTDIR)/%)
33
34all: $(PROGS32) $(PROGS64)
35
36install: all $(TESTDIR) $(TESTDIRPROGS)
37
38clobber: clean
39
40clean:
41	-$(RM) $(CMDS)
42
43$(TESTDIR):
44	$(INS.dir)
45
46$(TESTDIR)/%: %
47	$(INS.file)
48
49%.64: %.c
50	$(LINK64.c) -o $@ $< $(LDLIBS64)
51	$(POST_PROCESS)
52
53%.32: %.c
54	$(LINK.c) -o $@ $< $(LDLIBS)
55	$(POST_PROCESS)
56