xref: /illumos-gate/usr/src/test/os-tests/tests/poll/Makefile (revision e8d3efa1c56e5f2b5368600a2baeb7b1d54a07f8)
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 (c) 2012 by Delphix. All rights reserved.
14# Copyright 2016 Joyent, Inc.
15# Copyright 2026 Oxide Computer Company
16#
17
18include $(SRC)/cmd/Makefile.cmd
19include $(SRC)/test/Makefile.com
20
21PROG = poll_test epoll_test poll_close_test
22OBJS = $(PROG:%=%.o)
23SRCS = $(OBJS:%.o=%.c)
24
25poll_test := LDLIBS += -lsocket
26poll_test.ln := LDLIBS += -lsocket
27CSTD = $(CSTD_GNU99)
28
29ROOTOPTPKG = $(ROOT)/opt/os-tests
30TESTDIR = $(ROOTOPTPKG)/tests
31
32CMDS = $(PROG:%=$(TESTDIR)/%)
33$(CMDS) := FILEMODE = 0555
34
35LINTS = $(PROG:%=%.ln)
36
37all: $(PROG)
38
39install: all $(CMDS)
40
41lint: $(LINTS)
42
43clobber: clean
44	-$(RM) $(PROG)
45
46clean:
47	-$(RM) $(OBJS)
48
49%.ln: %.c
50	$(LINT.c) $< $(UTILS) $(LDLIBS)
51
52$(CMDS): $(TESTDIR) $(PROG)
53
54$(TESTDIR):
55	$(INS.dir)
56
57$(TESTDIR)/%: %
58	$(INS.file)
59