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 19include $(SRC)/cmd/Makefile.cmd 20include $(SRC)/test/Makefile.com 21 22# These test programs are built as both 32- and 64-bit variants 23PROGDA = rights recvmsg 24 25PROG = conn dgram drop_priv nosignal sockpair \ 26 $(PROGDA:%=%.32) $(PROGDA:%=%.64) \ 27 so_protocol 28 29LDLIBS += -lsocket 30LDLIBS64 += -lsocket 31 32CSTD = $(CSTD_GNU99) 33CPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ 34 35# needs work 36SMOFF += all_func_returns 37 38nosignal := LDLIBS += -lnsl 39rights.32 := LDLIBS += -lproc 40rights.64 := LDLIBS64 += -lproc 41 42ROOTOPTPKG = $(ROOT)/opt/os-tests 43TESTDIR = $(ROOTOPTPKG)/tests/sockfs 44 45CMDS = $(PROG:%=$(TESTDIR)/%) 46$(CMDS) := FILEMODE = 0555 47 48all: $(PROG) 49 50install: $(CMDS) 51 52clobber: clean 53 -$(RM) $(PROG) 54 55clean: 56 57$(CMDS): $(TESTDIR) $(PROG) 58 59$(TESTDIR): 60 $(INS.dir) 61 62$(TESTDIR)/%: % 63 $(INS.file) 64 65%.64: %.c 66 $(LINK64.c) -o $@ $< $(LDLIBS64) 67 $(POST_PROCESS) 68 69%.32: %.c 70 $(LINK.c) -o $@ $< $(LDLIBS) 71 $(POST_PROCESS) 72