fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The contents of this file are subject to the terms of the
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams# Common Development and Distribution License (the "License").
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams# You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens# or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens# and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens# information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
3c112a2b34403220c06c3e2fcac403358cfba168Eric Taylor# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher Siden# Copyright (c) 2012 by Delphix. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensPROG= ztest
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan AdamsOBJS= $(PROG).o
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan AdamsSRCS= $(OBJS:%.o=../%.c)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../../Makefile.cmd
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adamsinclude ../../Makefile.ctf
fa9e4066f08beec538e775443c5be79dd423fcabahrens
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher SidenINCS += -I../../../lib/libzpool/common
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher SidenINCS += -I../../../uts/common/fs/zfs
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher SidenINCS += -I../../../common/zfs
fa9e4066f08beec538e775443c5be79dd423fcabahrens
3c112a2b34403220c06c3e2fcac403358cfba168Eric TaylorLDLIBS += -lumem -lzpool -lcmdutils -lm -lnvpair
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensC99MODE= -xc99=%all
fa9e4066f08beec538e775443c5be79dd423fcabahrensC99LMODE= -Xc99=%all
fa9e4066f08beec538e775443c5be79dd423fcabahrensCFLAGS += -g $(CCVERBOSE)
fa9e4066f08beec538e775443c5be79dd423fcabahrensCFLAGS64 += -g $(CCVERBOSE)
fb09f5aad449c97fe309678f3f604982b563a96fMadhav SureshCPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# lint complains about unused _umem_* functions
fb09f5aad449c97fe309678f3f604982b563a96fMadhav SureshLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
fb09f5aad449c97fe309678f3f604982b563a96fMadhav SureshLINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
fa9e4066f08beec538e775443c5be79dd423fcabahrens
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs# lint complains about unused inline functions, even though
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs# they are "inline", not "static inline", with "extern inline"
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs# implementations and usage in libzpool.
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. GibbsLINTFLAGS += -erroff=E_STATIC_UNUSED
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. GibbsLINTFLAGS64 += -erroff=E_STATIC_UNUSED
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-switch
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
fa9e4066f08beec538e775443c5be79dd423fcabahrens.KEEP_STATE:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensall: $(PROG)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams$(PROG): $(OBJS)
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(POST_PROCESS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensclean:
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross $(RM) $(OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenslint: lint_SRCS
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../../Makefile.targ
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams%.o: ../%.c
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams $(COMPILE.c) $<
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adams $(POST_PROCESS_O)