xref: /illumos-gate/usr/src/cmd/ztest/Makefile (revision a0fbb7fb6838a78ac78444267878638832a983f3)
1fa9e4066Sahrens#
2fa9e4066Sahrens# CDDL HEADER START
3fa9e4066Sahrens#
4fa9e4066Sahrens# The contents of this file are subject to the terms of the
5ea8dc4b6Seschrock# Common Development and Distribution License (the "License").
6ea8dc4b6Seschrock# You may not use this file except in compliance with the License.
7fa9e4066Sahrens#
8fa9e4066Sahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9fa9e4066Sahrens# or http://www.opensolaris.org/os/licensing.
10fa9e4066Sahrens# See the License for the specific language governing permissions
11fa9e4066Sahrens# and limitations under the License.
12fa9e4066Sahrens#
13fa9e4066Sahrens# When distributing Covered Code, include this CDDL HEADER in each
14fa9e4066Sahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15fa9e4066Sahrens# If applicable, add the following below this CDDL HEADER, with the
16fa9e4066Sahrens# fields enclosed by brackets "[]" replaced with your own identifying
17fa9e4066Sahrens# information: Portions Copyright [yyyy] [name of copyright owner]
18fa9e4066Sahrens#
19fa9e4066Sahrens# CDDL HEADER END
20fa9e4066Sahrens#
21fa9e4066Sahrens#
22*a0fbb7fbSToomas Soome# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23*a0fbb7fbSToomas Soome# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
24*a0fbb7fbSToomas Soome# Copyright 2017 RackTop Systems.
25*a0fbb7fbSToomas Soome# Copyright 2020 Joyent, Inc.
26fa9e4066Sahrens
27*a0fbb7fbSToomas SoomePROG=		ztest
282c601221SChris WilliamsonBASHPROG=	zloop
292c601221SChris WilliamsonROOTBASHPROG=	$(ROOTBIN)/$(BASHPROG)
30fa9e4066Sahrens
3192c82aaeSYuri PankovCLOBBERFILES=	$(BASHPROG)
3292c82aaeSYuri Pankov
33*a0fbb7fbSToomas SoomeOBJS= $(PROG).o
34*a0fbb7fbSToomas Soome
35fa9e4066Sahrensinclude ../Makefile.cmd
36*a0fbb7fbSToomas Soomeinclude ../Makefile.cmd.64
37*a0fbb7fbSToomas Soomeinclude ../Makefile.ctf
38fa9e4066Sahrens
39*a0fbb7fbSToomas SoomeINCS += -I../../lib/libzpool/common
40*a0fbb7fbSToomas SoomeINCS += -I../../uts/common/fs/zfs
41*a0fbb7fbSToomas SoomeINCS += -I../../uts/common/fs/zfs/lua
42*a0fbb7fbSToomas SoomeINCS += -I../../common/zfs
43*a0fbb7fbSToomas SoomeINCS += -I../../lib/libzutil/common
44fa9e4066Sahrens
45*a0fbb7fbSToomas SoomeLDLIBS += -lumem -lzpool -lcmdutils -lm -lnvpair -lfakekernel -lzutil
46*a0fbb7fbSToomas Soome
47*a0fbb7fbSToomas SoomeCSTD= $(CSTD_GNU99)
48*a0fbb7fbSToomas SoomeCFLAGS += -g $(CCVERBOSE)
49*a0fbb7fbSToomas SoomeCFLAGS64 += -g $(CCVERBOSE)
50*a0fbb7fbSToomas SoomeCPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
51*a0fbb7fbSToomas SoomeCPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
52*a0fbb7fbSToomas Soome
53*a0fbb7fbSToomas SoomeCERRWARN += -_gcc=-Wno-switch
54*a0fbb7fbSToomas Soome
55*a0fbb7fbSToomas Soome# false positive
56*a0fbb7fbSToomas SoomeSMOFF += signed
57*a0fbb7fbSToomas Soome
58*a0fbb7fbSToomas Soome# needs work
59*a0fbb7fbSToomas SoomeSMOFF += all_func_returns
60fa9e4066Sahrens
61fa9e4066Sahrens.KEEP_STATE:
62fa9e4066Sahrens
63*a0fbb7fbSToomas Soomeall: $(PROG) $(BASHPROG)
64fa9e4066Sahrens
65*a0fbb7fbSToomas Soomeinstall: all $(ROOTPROG) $(ROOTBASHPROG)
662c601221SChris Williamson
67*a0fbb7fbSToomas Soome$(PROG): $(OBJS)
68*a0fbb7fbSToomas Soome	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
69*a0fbb7fbSToomas Soome	$(POST_PROCESS)
70fa9e4066Sahrens
71*a0fbb7fbSToomas Soomeclean:
72*a0fbb7fbSToomas Soome	$(RM) $(OBJS)
73fa9e4066Sahrens
74fa9e4066Sahrensinclude ../Makefile.targ
75