1d583b39bSJohn Wren Kennedy# 2d583b39bSJohn Wren Kennedy# This file and its contents are supplied under the terms of the 3d583b39bSJohn Wren Kennedy# Common Development and Distribution License ("CDDL"), version 1.0. 4d583b39bSJohn Wren Kennedy# You may only use this file in accordance with the terms of version 5d583b39bSJohn Wren Kennedy# 1.0 of the CDDL. 6d583b39bSJohn Wren Kennedy# 7d583b39bSJohn Wren Kennedy# A full copy of the text of the CDDL should have accompanied this 8d583b39bSJohn Wren Kennedy# source. A copy of the CDDL is also available via the Internet at 9d583b39bSJohn Wren Kennedy# http://www.illumos.org/license/CDDL. 10d583b39bSJohn Wren Kennedy# 11d583b39bSJohn Wren Kennedy 12d583b39bSJohn Wren Kennedy# 13d583b39bSJohn Wren Kennedy# Copyright (c) 2012 by Delphix. All rights reserved. 14a192d1c0SPatrick Mooney# Copyright 2016 Joyent, Inc. 15d583b39bSJohn Wren Kennedy# 16d583b39bSJohn Wren Kennedy 17d583b39bSJohn Wren Kennedyinclude $(SRC)/cmd/Makefile.cmd 18d583b39bSJohn Wren Kennedyinclude $(SRC)/test/Makefile.com 19d583b39bSJohn Wren Kennedy 20a192d1c0SPatrick MooneyPROG = poll_test epoll_test 21d583b39bSJohn Wren KennedyOBJS = $(PROG:%=%.o) 22d583b39bSJohn Wren KennedySRCS = $(OBJS:%.o=%.c) 23d583b39bSJohn Wren Kennedy 24a192d1c0SPatrick Mooneypoll_test := LDLIBS += -lsocket 25a192d1c0SPatrick Mooneypoll_test.ln := LDLIBS += -lsocket 26*bd0ce624SYuri PankovCSTD = $(CSTD_GNU99) 27d583b39bSJohn Wren Kennedy 28d583b39bSJohn Wren KennedyROOTOPTPKG = $(ROOT)/opt/os-tests 29d583b39bSJohn Wren KennedyTESTDIR = $(ROOTOPTPKG)/tests 30d583b39bSJohn Wren Kennedy 31d583b39bSJohn Wren KennedyCMDS = $(PROG:%=$(TESTDIR)/%) 32d583b39bSJohn Wren Kennedy$(CMDS) := FILEMODE = 0555 33d583b39bSJohn Wren Kennedy 34a192d1c0SPatrick MooneyLINTS = $(PROG:%=%.ln) 35a192d1c0SPatrick Mooney 36d583b39bSJohn Wren Kennedyall: $(PROG) 37d583b39bSJohn Wren Kennedy 38d583b39bSJohn Wren Kennedyinstall: all $(CMDS) 39d583b39bSJohn Wren Kennedy 40a192d1c0SPatrick Mooneylint: $(LINTS) 41d583b39bSJohn Wren Kennedy 42d583b39bSJohn Wren Kennedyclobber: clean 43d583b39bSJohn Wren Kennedy -$(RM) $(PROG) 44d583b39bSJohn Wren Kennedy 45d583b39bSJohn Wren Kennedyclean: 46d583b39bSJohn Wren Kennedy -$(RM) $(OBJS) 47d583b39bSJohn Wren Kennedy 48a192d1c0SPatrick Mooney%.ln: %.c 49a192d1c0SPatrick Mooney $(LINT.c) $< $(UTILS) $(LDLIBS) 50a192d1c0SPatrick Mooney 51d583b39bSJohn Wren Kennedy$(CMDS): $(TESTDIR) $(PROG) 52d583b39bSJohn Wren Kennedy 53d583b39bSJohn Wren Kennedy$(TESTDIR): 54d583b39bSJohn Wren Kennedy $(INS.dir) 55d583b39bSJohn Wren Kennedy 56d583b39bSJohn Wren Kennedy$(TESTDIR)/%: % 57d583b39bSJohn Wren Kennedy $(INS.file) 58