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# Copyright (C) 2015 STRATO AG. All rights reserved. 13# Copyright 2020 Joyent, Inc. 14# 15 16include $(SRC)/Makefile.master 17 18ROOTOPTPKG = $(ROOT)/opt/zfs-tests 19TESTDIR = $(ROOTOPTPKG)/tests/functional/libzfs 20PROG = many_fds 21SCRIPTS = setup libzfs_input cleanup 22 23include $(SRC)/cmd/Makefile.cmd 24include $(SRC)/test/Makefile.com 25 26OBJS = $(PROG:%=%.o) 27SRCS = $(OBJS:%.o=%.c) 28LDLIBS += -lzfs 29 30CMDS = $(PROG:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%) 31$(CMDS) := FILEMODE = 0555 32 33all: $(PROG) 34 35$(PROG): $(OBJS) 36 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 37 $(POST_PROCESS) 38 39%.o: ../%.c 40 $(COMPILE.c) $< 41 42install: all $(CMDS) 43 44clobber: clean 45 -$(RM) $(PROG) 46 47clean: 48 -$(RM) $(OBJS) 49 50$(CMDS): $(TESTDIR) $(PROG) 51 52$(TESTDIR): 53 $(INS.dir) 54 55$(TESTDIR)/%: % 56 $(INS.file) 57 58$(TESTDIR)/%: %.ksh 59 $(INS.rename) 60