Makefiles need to specify C99 mode consistently
[unleashed.git] / usr / src / test / zfs-tests / tests / functional / checksum / Makefile.subdirs
blobdd5d36bc4fd9602b85c90663a2860c0442cb28d5
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.
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.
13 # Copyright (c) 2015, 2016 by Delphix. All rights reserved.
16 include $(SRC)/cmd/Makefile.cmd
18 ROOTOPTPKG = $(ROOT)/opt/zfs-tests
19 TESTDIR = $(ROOTOPTPKG)/tests/functional/checksum
21 OBJS = $(PROG:%=%.o)
22 SRCS = $(OBJS:%.o=../%.c)
24 CMD32 = $(PROG:%=$(TESTDIR)/%.$(MACH))
25 CMD64 = $(PROG:%=$(TESTDIR)/%.$(MACH64))
26 CMDS = $(CMD32) $(CMD64)
27 $(CMDS) := FILEMODE = 0555
29 CSTD = $(CSTD_GNU99)
30 CFLAGS += -I $(SRC)/uts/common -D_KERNEL
31 LDLIBS += -lmd
33 all: $(PROG) $(TESTDIR)
35 clobber: clean
37 clean:
38         $(RM) $(PROG)
40 include $(SRC)/cmd/Makefile.targ
42 $(TESTDIR):
43         $(INS.dir)
45 $(TESTDIR)/%.$(MACH): %
46         $(INS.rename)
48 $(TESTDIR)/%.$(MACH64): %
49         $(INS.rename)
51 %: ../%.c
52         $(LINK.c) -o $@ $< $(LDLIBS)
53         $(POST_PROCESS)