xref: /illumos-gate/usr/src/test/zfs-tests/tests/functional/checksum/Makefile.subdirs (revision d1e631af56641f21cde1f1efe3a9623ff9d6ee7c)
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) 2015 by Delphix. All rights reserved.
14#
15
16include $(SRC)/cmd/Makefile.cmd
17
18ROOTOPTPKG = $(ROOT)/opt/zfs-tests
19TESTDIR = $(ROOTOPTPKG)/tests/functional/checksum
20
21OBJS = $(PROG:%=%.o)
22SRCS = $(OBJS:%.o=../%.c)
23
24CMD32 = $(PROG:%=$(TESTDIR)/%.$(MACH))
25CMD64 = $(PROG:%=$(TESTDIR)/%.$(MACH64))
26CMDS = $(CMD32) $(CMD64)
27$(CMDS) := FILEMODE = 0555
28
29C99MODE = $(C99_ENABLE)
30CFLAGS += -I $(SRC)/uts/common -D_KERNEL
31LDLIBS += -lmd
32LINTFLAGS += -u
33LINTFLAGS64 += -u
34
35all: $(PROG) $(TESTDIR)
36
37lint: lint_SRCS
38
39clobber: clean
40
41clean:
42	$(RM) $(PROG)
43
44include $(SRC)/cmd/Makefile.targ
45
46$(TESTDIR):
47	$(INS.dir)
48
49$(TESTDIR)/%.$(MACH): %
50	$(INS.rename)
51
52$(TESTDIR)/%.$(MACH64): %
53	$(INS.rename)
54
55%: ../%.c
56	$(LINK.c) -o $@ $< $(LDLIBS)
57	$(POST_PROCESS)
58