bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert#
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# This file and its contents are supplied under the terms of the
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# Common Development and Distribution License ("CDDL"), version 1.0.
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# You may only use this file in accordance with the terms of version
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# 1.0 of the CDDL.
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert#
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# A full copy of the text of the CDDL should have accompanied this
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# source. A copy of the CDDL is also available via the Internet at
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# http://www.illumos.org/license/CDDL.
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert#
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert#
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert# Copyright (C) 2015 STRATO AG. All rights reserved.
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert#
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertinclude $(SRC)/Makefile.master
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertROOTOPTPKG = $(ROOT)/opt/zfs-tests
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertTESTDIR = $(ROOTOPTPKG)/tests/functional/libzfs
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertPROG = many_fds
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertSCRIPTS =
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertinclude $(SRC)/cmd/Makefile.cmd
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertinclude $(SRC)/test/Makefile.com
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertOBJS = $(PROG:%=%.o)
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertSRCS = $(OBJS:%.o=%.c)
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertLDLIBS += -lzfs
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon KlinkertCMDS = $(PROG:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert$(CMDS) := FILEMODE = 0555
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertall: $(PROG)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert$(PROG): $(OBJS)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert $(POST_PROCESS)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert%.o: ../%.c
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert $(COMPILE.c) $<
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertinstall: all $(CMDS)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertlint: lint_SRCS
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertclobber: clean
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert -$(RM) $(PROG)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkertclean:
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert -$(RM) $(OBJS)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert$(CMDS): $(TESTDIR) $(PROG)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert$(TESTDIR):
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert $(INS.dir)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert$(TESTDIR)/%: %
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert $(INS.file)
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert$(TESTDIR)/%: %.ksh
bde3d612a7c090234c60e6e4578821237a5db135Simon Klinkert $(INS.rename)