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 2020 Joyent, Inc. 14# 15 16include $(SRC)/Makefile.master 17 18PROG = sysevent 19 20SCRIPTS = cleanup \ 21 resilver_restart_001 \ 22 setup 23 24include $(SRC)/cmd/Makefile.cmd 25include $(SRC)/test/Makefile.com 26 27ROOTOPTPKG = $(ROOT)/opt/zfs-tests 28TARGETDIR = $(ROOTOPTPKG)/tests/functional/resilver 29 30OBJS = $(PROG:%=%.o) 31SRCS = $(OBJS:%.o=%.c) 32SRCFILES = resilver.cfg 33 34CMDS = $(PROG:%=$(TARGETDIR)/%) $(SCRIPTS:%=$(TARGETDIR)/%) 35$(CMDS) := FILEMODE = 0555 36 37FILES = $(SRCFILES:%=$(TARGETDIR)/%) 38$(FILES) := FILEMODE = 0444 39 40CPPFLAGS += -D__EXTENSIONS__ 41LDLIBS += -lsysevent 42 43all: $(PROG) 44 45$(PROG): $(OBJS) 46 $(LINK.c) $(OBJS) -o $@ $(LDFLAGS) $(LDLIBS) 47 $(POST_PROCESS) 48 49%.o: %.c 50 $(COMPILE.c) $< 51 52install: all $(CMDS) $(FILES) 53 54clobber: clean 55 -$(RM) $(PROG) 56 57clean: 58 -$(RM) $(OBJS) 59 60$(CMDS): $(TARGETDIR) $(PROG) 61 62$(FILES): $(SRCFILES) 63 64$(TARGETDIR): 65 $(INS.dir) 66 67$(TARGETDIR)/%: % 68 $(INS.file) 69 70$(TARGETDIR)/%: %.ksh 71 $(INS.rename) 72