1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# Copyright (c) 2012 by Delphix. All rights reserved. 26# Copyright 2020 Joyent, Inc. 27# Copyright 2017 RackTop Systems. 28# 29 30PROG= zdb 31OBJS= zdb.o zdb_il.o 32 33include ../Makefile.cmd 34include ../Makefile.cmd.64 35include ../Makefile.ctf 36 37INCS += -I../../lib/libzpool/common 38INCS += -I../../uts/common/fs/zfs 39INCS += -I../../common/zfs 40INCS += -I../../lib/libzutil/common 41 42LDLIBS += -lzpool -lumem -lnvpair -lzutil -lavl -lfakekernel 43 44CSTD= $(CSTD_GNU99) 45 46CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL 47CPPFLAGS += $(INCS) 48$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 49 50# re-enable warnings that we can tolerate, which are disabled by default 51# in Makefile.master 52CERRWARN += -_gcc=-Wmissing-braces 53CERRWARN += -_gcc=-Wsign-compare 54 55SMOFF += 64bit_shift,all_func_returns 56 57.KEEP_STATE: 58 59all: $(PROG) 60 61$(PROG): $(OBJS) 62 $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 63 $(POST_PROCESS) 64 65install: all $(ROOTUSRSBINPROG) 66 67clean: 68 $(RM) $(OBJS) 69 70include ../Makefile.targ 71