xref: /titanic_50/usr/src/test/zfs-tests/tests/functional/libzfs/Makefile (revision bde3d612a7c090234c60e6e4578821237a5db135)
1*bde3d612SSimon Klinkert#
2*bde3d612SSimon Klinkert# This file and its contents are supplied under the terms of the
3*bde3d612SSimon Klinkert# Common Development and Distribution License ("CDDL"), version 1.0.
4*bde3d612SSimon Klinkert# You may only use this file in accordance with the terms of version
5*bde3d612SSimon Klinkert# 1.0 of the CDDL.
6*bde3d612SSimon Klinkert#
7*bde3d612SSimon Klinkert# A full copy of the text of the CDDL should have accompanied this
8*bde3d612SSimon Klinkert# source.  A copy of the CDDL is also available via the Internet at
9*bde3d612SSimon Klinkert# http://www.illumos.org/license/CDDL.
10*bde3d612SSimon Klinkert#
11*bde3d612SSimon Klinkert#
12*bde3d612SSimon Klinkert# Copyright (C) 2015 STRATO AG. All rights reserved.
13*bde3d612SSimon Klinkert#
14*bde3d612SSimon Klinkert
15*bde3d612SSimon Klinkertinclude $(SRC)/Makefile.master
16*bde3d612SSimon Klinkert
17*bde3d612SSimon KlinkertROOTOPTPKG = $(ROOT)/opt/zfs-tests
18*bde3d612SSimon KlinkertTESTDIR = $(ROOTOPTPKG)/tests/functional/libzfs
19*bde3d612SSimon KlinkertPROG = many_fds
20*bde3d612SSimon KlinkertSCRIPTS =
21*bde3d612SSimon Klinkert
22*bde3d612SSimon Klinkertinclude $(SRC)/cmd/Makefile.cmd
23*bde3d612SSimon Klinkertinclude $(SRC)/test/Makefile.com
24*bde3d612SSimon Klinkert
25*bde3d612SSimon KlinkertOBJS = $(PROG:%=%.o)
26*bde3d612SSimon KlinkertSRCS = $(OBJS:%.o=%.c)
27*bde3d612SSimon KlinkertLDLIBS += -lzfs
28*bde3d612SSimon Klinkert
29*bde3d612SSimon KlinkertCMDS = $(PROG:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
30*bde3d612SSimon Klinkert$(CMDS) := FILEMODE = 0555
31*bde3d612SSimon Klinkert
32*bde3d612SSimon Klinkertall: $(PROG)
33*bde3d612SSimon Klinkert
34*bde3d612SSimon Klinkert$(PROG): $(OBJS)
35*bde3d612SSimon Klinkert	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
36*bde3d612SSimon Klinkert	$(POST_PROCESS)
37*bde3d612SSimon Klinkert
38*bde3d612SSimon Klinkert%.o: ../%.c
39*bde3d612SSimon Klinkert	$(COMPILE.c) $<
40*bde3d612SSimon Klinkert
41*bde3d612SSimon Klinkertinstall: all $(CMDS)
42*bde3d612SSimon Klinkert
43*bde3d612SSimon Klinkertlint: lint_SRCS
44*bde3d612SSimon Klinkert
45*bde3d612SSimon Klinkertclobber: clean
46*bde3d612SSimon Klinkert	-$(RM) $(PROG)
47*bde3d612SSimon Klinkert
48*bde3d612SSimon Klinkertclean:
49*bde3d612SSimon Klinkert	-$(RM) $(OBJS)
50*bde3d612SSimon Klinkert
51*bde3d612SSimon Klinkert$(CMDS): $(TESTDIR) $(PROG)
52*bde3d612SSimon Klinkert
53*bde3d612SSimon Klinkert$(TESTDIR):
54*bde3d612SSimon Klinkert	$(INS.dir)
55*bde3d612SSimon Klinkert
56*bde3d612SSimon Klinkert$(TESTDIR)/%: %
57*bde3d612SSimon Klinkert	$(INS.file)
58*bde3d612SSimon Klinkert
59*bde3d612SSimon Klinkert$(TESTDIR)/%: %.ksh
60*bde3d612SSimon Klinkert	$(INS.rename)
61