xref: /illumos-gate/usr/src/test/zfs-tests/tests/functional/ctime/Makefile (revision 6a817834d81cc75ce12d0d393320837b1fec1e85)
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#
13# Copyright (c) 2013 by Delphix. All rights reserved.
14#
15
16include $(SRC)/Makefile.master
17
18ROOTOPTPKG = $(ROOT)/opt/zfs-tests
19TESTDIR = $(ROOTOPTPKG)/tests/functional/ctime
20
21PROG = ctime_001_pos
22
23SCRIPTS = cleanup \
24	setup
25
26include $(SRC)/cmd/Makefile.cmd
27include $(SRC)/test/Makefile.com
28
29ROOTOPTPKG = $(ROOT)/opt/zfs-tests
30
31OBJS = $(PROG:%=%.o)
32SRCS = $(OBJS:%.o=%.c)
33
34CMDS = $(PROG:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
35$(CMDS) := FILEMODE = 0555
36
37CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
38
39all: $(PROG)
40
41$(PROG): $(OBJS)
42	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
43	$(POST_PROCESS)
44
45%.o: ../%.c
46	$(COMPILE.c) $<
47
48install: all $(CMDS)
49
50lint: lint_SRCS
51
52clobber: clean
53	-$(RM) $(PROG)
54
55clean:
56	-$(RM) $(OBJS)
57
58$(CMDS): $(TESTDIR) $(PROG)
59
60$(TESTDIR):
61	$(INS.dir)
62
63$(TESTDIR)/%: %
64	$(INS.file)
65
66$(TESTDIR)/%: %.ksh
67	$(INS.rename)
68