xref: /titanic_44/usr/src/test/zfs-tests/tests/functional/exec/Makefile (revision f38cb554a534c6df738be3f4d23327e69888e634)
1*f38cb554SJohn Wren Kennedy#
2*f38cb554SJohn Wren Kennedy# This file and its contents are supplied under the terms of the
3*f38cb554SJohn Wren Kennedy# Common Development and Distribution License ("CDDL"), version 1.0.
4*f38cb554SJohn Wren Kennedy# You may only use this file in accordance with the terms of version
5*f38cb554SJohn Wren Kennedy# 1.0 of the CDDL.
6*f38cb554SJohn Wren Kennedy#
7*f38cb554SJohn Wren Kennedy# A full copy of the text of the CDDL should have accompanied this
8*f38cb554SJohn Wren Kennedy# source.  A copy of the CDDL is also available via the Internet at
9*f38cb554SJohn Wren Kennedy# http://www.illumos.org/license/CDDL.
10*f38cb554SJohn Wren Kennedy#
11*f38cb554SJohn Wren Kennedy
12*f38cb554SJohn Wren Kennedy#
13*f38cb554SJohn Wren Kennedy# Copyright (c) 2013 by Delphix. All rights reserved.
14*f38cb554SJohn Wren Kennedy#
15*f38cb554SJohn Wren Kennedy
16*f38cb554SJohn Wren Kennedyinclude $(SRC)/Makefile.master
17*f38cb554SJohn Wren Kennedy
18*f38cb554SJohn Wren KennedyROOTOPTPKG = $(ROOT)/opt/zfs-tests
19*f38cb554SJohn Wren KennedyTESTDIR = $(ROOTOPTPKG)/tests/functional/exec
20*f38cb554SJohn Wren Kennedy
21*f38cb554SJohn Wren KennedyPROG = mmap_exec
22*f38cb554SJohn Wren Kennedy
23*f38cb554SJohn Wren KennedySCRIPTS = cleanup \
24*f38cb554SJohn Wren Kennedy	exec_001_pos \
25*f38cb554SJohn Wren Kennedy	exec_002_neg \
26*f38cb554SJohn Wren Kennedy	setup
27*f38cb554SJohn Wren Kennedy
28*f38cb554SJohn Wren Kennedyinclude $(SRC)/cmd/Makefile.cmd
29*f38cb554SJohn Wren Kennedyinclude $(SRC)/test/Makefile.com
30*f38cb554SJohn Wren Kennedy
31*f38cb554SJohn Wren KennedyROOTOPTPKG = $(ROOT)/opt/zfs-tests
32*f38cb554SJohn Wren Kennedy
33*f38cb554SJohn Wren KennedyOBJS = $(PROG:%=%.o)
34*f38cb554SJohn Wren KennedySRCS = $(OBJS:%.o=%.c)
35*f38cb554SJohn Wren Kennedy
36*f38cb554SJohn Wren KennedyCMDS = $(PROG:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
37*f38cb554SJohn Wren Kennedy$(CMDS) := FILEMODE = 0555
38*f38cb554SJohn Wren Kennedy
39*f38cb554SJohn Wren KennedyCPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
40*f38cb554SJohn Wren Kennedy
41*f38cb554SJohn Wren Kennedyall: $(PROG)
42*f38cb554SJohn Wren Kennedy
43*f38cb554SJohn Wren Kennedy$(PROG): $(OBJS)
44*f38cb554SJohn Wren Kennedy	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
45*f38cb554SJohn Wren Kennedy	$(POST_PROCESS)
46*f38cb554SJohn Wren Kennedy
47*f38cb554SJohn Wren Kennedy%.o: ../%.c
48*f38cb554SJohn Wren Kennedy	$(COMPILE.c) $<
49*f38cb554SJohn Wren Kennedy
50*f38cb554SJohn Wren Kennedyinstall: all $(CMDS)
51*f38cb554SJohn Wren Kennedy
52*f38cb554SJohn Wren Kennedylint: lint_SRCS
53*f38cb554SJohn Wren Kennedy
54*f38cb554SJohn Wren Kennedyclobber: clean
55*f38cb554SJohn Wren Kennedy	-$(RM) $(PROG)
56*f38cb554SJohn Wren Kennedy
57*f38cb554SJohn Wren Kennedyclean:
58*f38cb554SJohn Wren Kennedy	-$(RM) $(OBJS)
59*f38cb554SJohn Wren Kennedy
60*f38cb554SJohn Wren Kennedy$(CMDS): $(TESTDIR) $(PROG)
61*f38cb554SJohn Wren Kennedy
62*f38cb554SJohn Wren Kennedy$(TESTDIR):
63*f38cb554SJohn Wren Kennedy	$(INS.dir)
64*f38cb554SJohn Wren Kennedy
65*f38cb554SJohn Wren Kennedy$(TESTDIR)/%: %
66*f38cb554SJohn Wren Kennedy	$(INS.file)
67*f38cb554SJohn Wren Kennedy
68*f38cb554SJohn Wren Kennedy$(TESTDIR)/%: %.ksh
69*f38cb554SJohn Wren Kennedy	$(INS.rename)
70