xref: /illumos-gate/usr/src/cmd/zdb/Makefile (revision 37630fa7bc917bff982fad0be16789eba84c5486)
1fa9e4066Sahrens#
2fa9e4066Sahrens# CDDL HEADER START
3fa9e4066Sahrens#
4fa9e4066Sahrens# The contents of this file are subject to the terms of the
5*37630fa7SToomas Soome# Common Development and Distribution License (the "License").
6*37630fa7SToomas Soome# 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#
21*37630fa7SToomas Soome
22fa9e4066Sahrens#
23*37630fa7SToomas Soome# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24fa9e4066Sahrens# Use is subject to license terms.
25*37630fa7SToomas Soome# Copyright (c) 2012 by Delphix. All rights reserved.
26*37630fa7SToomas Soome# Copyright 2020 Joyent, Inc.
27*37630fa7SToomas Soome# Copyright 2017 RackTop Systems.
28fa9e4066Sahrens#
29fa9e4066Sahrens
30*37630fa7SToomas SoomePROG=	zdb
31*37630fa7SToomas SoomeOBJS=	zdb.o zdb_il.o
32fa9e4066Sahrens
33fa9e4066Sahrensinclude ../Makefile.cmd
34*37630fa7SToomas Soomeinclude ../Makefile.cmd.64
35*37630fa7SToomas Soomeinclude ../Makefile.ctf
36fa9e4066Sahrens
37*37630fa7SToomas SoomeINCS += -I../../lib/libzpool/common
38*37630fa7SToomas SoomeINCS +=	-I../../uts/common/fs/zfs
39*37630fa7SToomas SoomeINCS +=	-I../../common/zfs
40*37630fa7SToomas SoomeINCS += -I../../lib/libzutil/common
41fa9e4066Sahrens
42*37630fa7SToomas SoomeLDLIBS += -lzpool -lumem -lnvpair -lzutil -lavl -lfakekernel
43*37630fa7SToomas Soome
44*37630fa7SToomas SoomeCSTD=	$(CSTD_GNU99)
45*37630fa7SToomas Soome
46*37630fa7SToomas SoomeCPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
47*37630fa7SToomas SoomeCPPFLAGS += $(INCS)
48*37630fa7SToomas Soome$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
49*37630fa7SToomas Soome
50*37630fa7SToomas Soome# re-enable warnings that we can tolerate, which are disabled by default
51*37630fa7SToomas Soome# in Makefile.master
52*37630fa7SToomas SoomeCERRWARN += -_gcc=-Wmissing-braces
53*37630fa7SToomas SoomeCERRWARN += -_gcc=-Wsign-compare
54*37630fa7SToomas Soome
55*37630fa7SToomas SoomeSMOFF += 64bit_shift,all_func_returns
56fa9e4066Sahrens
57fa9e4066Sahrens.KEEP_STATE:
58fa9e4066Sahrens
59*37630fa7SToomas Soomeall: $(PROG)
60fa9e4066Sahrens
61*37630fa7SToomas Soome$(PROG): $(OBJS)
62*37630fa7SToomas Soome	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
63*37630fa7SToomas Soome	$(POST_PROCESS)
64fa9e4066Sahrens
65*37630fa7SToomas Soomeinstall: all $(ROOTUSRSBINPROG)
66fa9e4066Sahrens
67*37630fa7SToomas Soomeclean:
68*37630fa7SToomas Soome	$(RM) $(OBJS)
69fa9e4066Sahrens
70fa9e4066Sahrensinclude ../Makefile.targ
71