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 2017 Gordon W. Ross
15 # Copyright (c) 2018, Joyent, Inc.
16 # Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
17 #
18
19 include $(SRC)/cmd/Makefile.cmd
20 include $(SRC)/test/Makefile.com
21
22 PROG = conn dgram drop_priv nosignal sockpair \
23 rights.32 rights.64
24
25 LDLIBS += -lsocket
26 LDLIBS64 += -lsocket
27
28 CSTD = $(CSTD_GNU99)
29 CPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
30
31 # needs work
32 SMOFF += all_func_returns
33
34 nosignal := LDLIBS += -lnsl
35 rights.32 := LDLIBS += -lproc
36 rights.64 := LDLIBS64 += -lproc
37
38 ROOTOPTPKG = $(ROOT)/opt/os-tests
39 TESTDIR = $(ROOTOPTPKG)/tests/sockfs
40
41 CMDS = $(PROG:%=$(TESTDIR)/%)
42 $(CMDS) := FILEMODE = 0555
43
44 all: $(PROG)
45
46 install: $(CMDS)
47
48 clobber: clean
49 -$(RM) $(PROG)
50
51 clean:
52
53 $(CMDS): $(TESTDIR) $(PROG)
54
55 $(TESTDIR):
56 $(INS.dir)
57
58 $(TESTDIR)/%: %
59 $(INS.file)
60
61 %.64: %.c
62 $(LINK64.c) -o $@ $< $(LDLIBS64)
63 $(POST_PROCESS)
64
65 %.32: %.c
66 $(LINK.c) -o $@ $< $(LDLIBS)
67 $(POST_PROCESS)